Random 16 Byte nonce

Hi,

Can somebody tell me how I can generate a random 16-byte nonce in the 32-character hexadecimal format.
I like to do this in the mapper, is that possible?

Thanks for your help.

Hi Richard,

Here’s a sample pipeline that outputs a binary string base from a hexadecimal string hope this helps :slight_smile:

canvas 05_2022_02_28.slp (8.8 KB)

Hi Alchemiz

Thanks for the solution.

How do I make it an 32 character hexadecimal value instead of 40, the length must be 32?

Thanks

You can use Digest.md5(Math.randomUUID()) instead of sha1

You can also use Math.randomUUID().replace(/-/gi,’’)

I like to thank everybody for their help in this matter.

1 Like