Difference between revisions of "LlMD5String"

From Second Life Wiki
Jump to navigation Jump to search
(adding "string" and "encryption" categories, as requested on the related talkpage)
m
Line 30: Line 30:
|cat2=Encoding
|cat2=Encoding
|cat3=String
|cat3=String
|cat4=Encryption
|cat4
}}
}}{{LSLC|Encryption|llMD5String}}

Revision as of 13:36, 22 December 2008

Summary

Function: string llMD5String( string src, integer nonce );
0.0 Forced Delay
10.0 Energy

Returns a string of 32 hex characters that is the "Wikipedia logo"MD5 checksum of src with a "Wikipedia logo"salt of ":"+nonce.

• string src
• integer nonce

Specification

nonce is converted then appended to src after a colon (src+":"+(string)nonce). This is important to know if you are calculating a hash in another language and wish to compare with one calculated in LSL.

LSL strings are stored in the UTF-8 format.

Examples

<lsl> llSay(0, llMD5String("Hello, Avatar!", 0)); // returns 112abd47ceaae1c05a826828650434a6 </lsl>

Linux Example

$ echo -n 'Hello, Avatar!:0' | openssl md5
112abd47ceaae1c05a826828650434a6

See Also

Functions

•  llSHA1String

Deep Notes

Signature

function string llMD5String( string src, integer nonce );