Skip to content

Instantly share code, notes, and snippets.

@GoodnessEzeokafor
Created December 8, 2021 12:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Cold fusion examples
<cfoutput>
#hash("Password1!", "SHA-512", "UTF-8")#
</cfoutput>
# output - ECB3548B49FEFA9C984EC134FA362B3316EC8CC4C044B3A71444EED538ECC39461FE5D4DD1D71287FCD2B1C3354CC36873956B3E15229B5ACBDACDA276BABED1
@GoodnessEzeokafor
Copy link
Author

same code snippet for js

var pwd = "Password1!";
var hash1 = function (str) {
    return crypto.createHash('sha512').update(str).digest('hex').toUpperCase()
}
console.log(hash1(pwd));
#output is the same as cold fusion - ECB3548B49FEFA9C984EC134FA362B3316EC8CC4C044B3A71444EED538ECC39461FE5D4DD1D71287FCD2B1C3354CC36873956B3E15229B5ACBDACDA276BABED1 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment