Created
January 8, 2017 04:23
-
-
Save jimmycann/17999a47bbdb95f3e31b28a9336d82ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var crypto = require('crypto') | |
var elements = ['Hey ', 'Mike'] | |
var hashString = elements.reduce((a, b) => a + b); | |
console.log('Hash String: ', hashString); | |
var hashDigest = crypto.createHash('sha256').update(hashString).digest('hex'); | |
console.log('Hash Digest: ', hashDigest); | |
return hashDigest; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment