On Sun, Oct 29, 2006 at 04:51:59AM +0900, dc wrote: > Hi list. > > I need to encode some data with a userID and then also be able to > decode it with the same key. > > This is basically a quick approach to obfuscate URLs. Its for an > environment where we know the users ID with some degree of certainty. > > Are there any libraries/simple algorithms to do this in ruby? it might > be as simple as bitshiting a string around... > > any other suggested alternatives to this approach? I played around with the Tiny Encryption Algorithm[1] a year or so ago and ended up with a quick ruby implementation of it that is a snippet on rubyforge. (http://rubyforge.org/snippet/detail.php?type=snippet&id=101) enjoy, -jeremy [1] - http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm -- ======================================================================== Jeremy Hinegardner jeremy / hinegardner.org