Created
May 10, 2022 02:37
-
-
Save trycf/b954d74741a9d08c50c4ac6210c0bcf7 to your computer and use it in GitHub Desktop.
TryCF Gist
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> | |
key = '943b421c9eb07c830af81030552c86009268de4e532ba2ee2eab8247c6da0881'; | |
salt = '520f986b998545b4785e0defbc4f3c1203f22de2374a3d53cb7a7fe9fea309c5'; | |
keyBin = binaryDecode(key, "hex"); | |
saltBin = binaryDecode(salt, "hex"); | |
path = "/rs:fill:300:300:1/g:no/aHR0cDovL2ltZy5leGFtcGxlLmNvbS9wcmV0dHkvaW1hZ2UuanBn.png"; | |
pathBin = charsetDecode(path, "utf-8"); | |
// merge binary of salt and path | |
combined = []; | |
combined.append(saltBin, true); | |
combined.append(charsetDecode(path, "utf-8"), true); | |
result = lcase(hmac( javacast("byte[]", combined),keyBin,"HMACSHA256")); | |
writeDump(result); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment