Difference between revisions of "LlMD5String"

From Second Life Wiki
Jump to navigation Jump to search
Line 3: Line 3:
|func=llMD5String|return_type=string|p1_type=string|p1_name=src|p2_type=integer|p2_name=nonce
|func=llMD5String|return_type=string|p1_type=string|p1_name=src|p2_type=integer|p2_name=nonce
|func_footnote
|func_footnote
|func_desc=Performs a RSA Data Security, Inc. MD5 Message-Digest Algorithm on string with nonce. Returns a 32 character hex string. 
|func_desc
<p>Nonce is added to the string after a colon (stringcontents:nonce).  This is important to know if you are calculating a hash in another language and wish to compare with one calculated in LSL.
|return_text=of 32 hex characters that is the {{Wikipedia|MD5|MD5}} checksum of '''src''' with a {{Wikipedia|Salt_%28cryptography%29|salt}} of ":"+'''nonce'''.
|return_text
|spec='''nonce''' is converted then appended to '''src''' after a colon (stringcontents+":"+(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.
|spec
|caveats
|caveats
|constants
|constants
|examples
|examples=<pre>
llSay(0, llMD5String("Hello, Avatar!", 0)); // returns 112abd47ceaae1c05a826828650434a6
</pre>
 
====Linux Example====
<pre>
$ echo -n 'Hello, Avatar!:0' | openssl md5
112abd47ceaae1c05a826828650434a6
</pre>
|helpers
|helpers
|also_functions
|also_functions

Revision as of 12:44, 22 February 2007

Summary

Function: string llMD5String( string src, integer nonce );

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 (stringcontents+":"+(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.

Examples

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

Linux Example

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

Deep Notes

Search JIRA for related Issues

Signature

function string llMD5String( string src, integer nonce );