Skip to content

Instantly share code, notes, and snippets.

@jppommet
Last active February 17, 2022 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jppommet/6056932 to your computer and use it in GitHub Desktop.
Save jppommet/6056932 to your computer and use it in GitHub Desktop.
nodejs crypto sha1 hash in hexadecimal string representation.
// We use crypto.randomBytes(20) as an example to generate the seed with a higher entropy, higher number of unique values
var hash = crypto.createHash('sha1').update(crypto.randomBytes(20)).digest('hex')
@elbek69114
Copy link

cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment