Created
January 23, 2024 22:52
-
-
Save sl-service-account/61a9cd3e01009c6d2bca30092a20b54f to your computer and use it in GitHub Desktop.
Demonstration of using the new llComputeHash method in LSL
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
default { | |
touch_start(integer count) { | |
string message = "your-test-message-here"; | |
list algorithms = ["md5", "md5_sha1", "sha1", "sha224", "sha256", "sha384", "sha512"]; | |
integer algorithmCount = llGetListLength(algorithms); | |
llOwnerSay("message='" + message + "'"); | |
integer i = 0; | |
for (i = 0; i < algorithmCount; ++i) { | |
string algorithm = llList2String(algorithms, i); | |
string hash = llComputeHash(message, algorithm); | |
llOwnerSay(algorithm + "=" + hash); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment