Created
February 17, 2014 10:12
-
-
Save pkyeck/9048021 to your computer and use it in GitHub Desktop.
creating two different sha256 hashes
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 hash1 = crypto.createHash("sha256"); | |
hash1.update("topsecret", "utf8"); | |
console.log(hash1.digest("base64")); // UzNqZ2xkwTllU7K3yS84EmdognyTtk2RQgacEO2npyE= | |
var hash2 = crypto.createHash("sha256"); | |
hash2.update("topSecret", "utf8"); | |
console.log(hash2.digest("base64")); // mFuUzsUvYbRLt21+34+fwP6IpapAhqBLsbycLnGfQIc= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment