llComputeHash
function
Function syntax
string llComputeHash(string message,// Message string to be hashed.string algorithm// Cryptographic digest algorithm to use (e.g., md5, sha1, sha224, sha256, sha384, or sha512).
);- Returns
string- Energy
- 10
Supported values of algorithm are md5, md5_sha1, sha1, sha224, sha256, sha384, sha512.
Returns a string hex-encoded hash digest of message using cryptographic algorithm
string result = llComputeHash("", "");Examples
Section titled “Examples”Example 1
18 collapsed lines
default{ state_entry() { llOwnerSay("Ready"); }
touch_start(integer touch_count) { string message = "your-test-message-here";
list algorithms = ["md5", "md5_sha1", "sha1", "sha224", "sha256", "sha384", "sha512" ];
integer num_algorithms = llGetListLength(algorithms); llOwnerSay("message='" + message + "'");
integer i = 0; for (i = 0; i < num_algorithms; ++i) { string algorithm = llList2String(algorithms, i); string hash = llComputeHash(message, algorithm); llOwnerSay(algorithm + " : " + hash); } }}See also
Section titled “See also”Functions
Section titled “Functions”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.