Created
March 14, 2022 15:35
-
-
Save ThomasRettig/5db4104d75b5cf757b67522cd662b0c2 to your computer and use it in GitHub Desktop.
Little Node.js experiment which uses the `crypto` library to hash a string with the sha256 algorithm.
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
const { createHmac } = await import("crypto"); | |
const secret = "blah blah"; | |
const hash = createHmac("sha256", secret) | |
.update("Blah Blah") | |
.digest("hex"); | |
console.log(hash); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment