Skip to content

Instantly share code, notes, and snippets.

@jppommet
Last active January 2, 2025 08:24
Show Gist options
  • Select an option

  • Save jppommet/6056932 to your computer and use it in GitHub Desktop.

Select an option

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')
@ebozorov
Copy link
Copy Markdown

cool

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