Last active
May 4, 2022 17:49
-
-
Save isapir/0b509b986bd22130f48d38ab1f1f7869 to your computer and use it in GitHub Desktop.
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
<cfscript> | |
algorithm = "PBKDF2withHmacSha512"; | |
passphrase = "The passphrase is passphrase"; | |
// 16 random characters | |
salt = left(replace(createUUID(), "-", "", "all"), 16); | |
// approx. 300ms at the time of testing | |
iterations = 100000; | |
subkeySize = 256; | |
pbkdfKey = generatePBKDFKey(algorithm, passphrase, salt, iterations, subkeySize); | |
storedHash = salt & "." & pbkdfKey; | |
dump(storedHash); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment