|
Dustin Widget
Script Monkey for hire
Join date: 15 Feb 2006
Posts: 101
|
10-23-2006 20:11
I have been playing with the llXorBase64StringsCorrect() function tonight but am having some issues on getting it to decrypt properly. The lslwiki is a bit lacking on the explanation for this function, so hopefully I can get the advice of someone who knows it well. Here is the code. string skey = "safety";
default { touch_start(integer total_number) { string msg = llXorBase64StringsCorrect(llDetectedName(0),skey); llSay(0, llXorBase64StringsCorrect(msg,skey)); } }
My name is Dustin Widget, which should be displayed, yet it ouputs Dustig==. Is there an issue with using spaces in the string to be encrypted?
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
10-24-2006 02:33
No, you've missed out the string to base 64 conversion. string skey = "safety";
default { touch_start(integer total_number) { string msg = llXorBase64StringsCorrect(llStringToBase64(llDetectedName(0)),llStringToBase64(skey)); llSay(0, llBase64ToString(llXorBase64StringsCorrect(msg,llStringToBase64(skey)))); } } Will work. There are much neater ways to do it of course... converting skey once for a start.
|
|
Dustin Widget
Script Monkey for hire
Join date: 15 Feb 2006
Posts: 101
|
10-24-2006 08:52
Ahh! I didn't even think to convert to base64 before hand! Thanks a ton, Eloise.
|