Skip to content

Instantly share code, notes, and snippets.

@pkyeck
Created February 17, 2014 10:12
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 pkyeck/9048021 to your computer and use it in GitHub Desktop.
Save pkyeck/9048021 to your computer and use it in GitHub Desktop.
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