Hi,
I know trying to secure anything on the client-side is a no-no.
function crypt(text, key) {
var result = "";
for(var i=0, ii=text.length; i<ii; ++i) {
result += String.fromCharCode(key^text.charCodeAt(i));
}
return result;
}
crypt('{ data: "yep" }', 6) => "}&bgrg<&$ cv$&{"
crypt("}&bgrg<&$ cv$&{", 6) => { data: "yep" }
Can anyone help with a Ruby equivalent? to decrypt that string?
Or does anyone have other examples of client-side encryption and decryption
in Ruby?
Cheers,
--
Mark Brown.
www.yellowshoe.com.au
--
You received this message because you are subscribed to the Google Groups "Ruby
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rails-oceania?hl=en.