Sha1 on n8n cloud

Hi, so I was trying to use a sha1 crypto function in either crypto/function node, but since it’s not supported in the crypto node & n8n cloud can’t import custom npm functionality, I assume I would have to use the crypto function from somewhere else outside n8n then? Or is there an alternative that I’m not aware of? Thanks

Hey @lamela,
our Crypto node does support signing with SHA-1 using a private key. Is that what you were looking for?

1 Like

Hi @lamelama, the crypto module is one of the few available npm modules on n8n cloud. So if you, for example, want to calculate a SHA1 value based on a string, you could do something like this:

Just tested this on my own instance and it’s working fine:

1 Like

Thanks for the reply,but the function from the comment below is actually what I’m looking for. Just as a side note for some reason I couldn’t find the Alrogrith Name dropdown option the first time but once I saw your post & see that there’s supposed to be an option there I deleted the node and readded & it finally showed.

Yes this is exactly what I’m looking for initially I was looking to use separate npm module called sha1 which I couldn’t get to this would work for me. Thank you

1 Like

Glad to hear this works for you, thanks so much for confirming!

Hello, Dear MutedJam!
When i try to use you sample, i have error: ERROR: Cannot find module ‘crypto’ [Line 1]
What can be wrong? Moreover, the crypto node works

Hi @yura, welcome to the community!

Are you using n8n cloud? If not, you’d need to make the crypto module available yourself using the NODE_FUNCTION_ALLOW_BUILTIN environment variable.

However, seeing the crypto node works I wouldn’t bother :wink:

1 Like