Skip to content

Instantly share code, notes, and snippets.



Created Feb 17, 2014
What would you like to do?
creating two different sha256 hashes
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