Difference between revisions of "32bit Hash"
Jump to navigation
Jump to search
Gigs Taggart (talk | contribs) m (LSL 32bit Hash moved to 32bit Hash) |
m (Replaced <source> with <syntaxhighlight>) |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
Here's a function to turn | {{LSL Header}} | ||
Here's a function to turn an UUID into an integer. | |||
< | <syntaxhighlight lang="lsl2"> | ||
integer | integer Key2Integer(string inkey) | ||
{ | { | ||
return (integer)("0x" + llGetSubString(llMD5String(inkey,0), 0, 7)); | return (integer)("0x" + llGetSubString(llMD5String(inkey,0), 0, 7)); | ||
} | } | ||
</ | </syntaxhighlight> | ||
Note: The [[Seedable_PRNG]] example presents MD5 of MD5 of MD5 of ... as pseudo-random numbers | |||
{{LSLC|Examples|32bit Hash}} | {{LSLC|Examples|32bit Hash}} |
Latest revision as of 10:53, 6 December 2022
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Here's a function to turn an UUID into an integer.
integer Key2Integer(string inkey)
{
return (integer)("0x" + llGetSubString(llMD5String(inkey,0), 0, 7));
}
Note: The Seedable_PRNG example presents MD5 of MD5 of MD5 of ... as pseudo-random numbers