Skip to content

Instantly share code, notes, and snippets.

@marcusandre
Last active December 27, 2015 07:39
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 marcusandre/7290267 to your computer and use it in GitHub Desktop.
Save marcusandre/7290267 to your computer and use it in GitHub Desktop.
[Idea] Create a hash from Date and request ID.
var id = 123 // 'something from the database'
require('crypto')
.createHash('sha1')
.update(new Date() + id)
.digest('hex');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment