GwenNelson / opensim4opencog

Automatically exported from code.google.com/p/opensim4opencog
1 stars 0 forks source link

md5 not agreeing with LSL #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
the botcmd md5 does not agree with LSL

llMD5 takes two args, a string and an integer nonce.

the md5 hash is computed on the string, a colon, and the decimal
representation of the number.  This can be demonstrated with any
php based online md5 generator

md5 "tacos of god:12873"
prints
[19:53] md5: Success: $1$08b90c2ebcce5d7f46176eb7c05af0ea
the LSL script
default
{
    state_entry()
    {
        llSay(0, llMD5String(""tacos of god"", 12873));
    }
}

prints
[19:50]  Primitive: 6e130eabfe1f809eb6399796803e0d81

apparently the C# md5 function pads the string to length 32 bytes if shorter 
(this per doug).

while currently this is documented behavior, it's not very useful

Original issue reported on code.google.com by anneogb...@gmail.com on 21 May 2012 at 3:33

GoogleCodeExporter commented 9 years ago
I think the length of Padding (or) might be able to be put into the arguments 
as a fix

Original comment by logicmoo@gmail.com on 1 Jul 2012 at 8:39

GoogleCodeExporter commented 9 years ago

Original comment by logicmoo@gmail.com on 22 Jul 2012 at 4:36