From: Eleanor McHugh Date: 2009-05-03T21:48:14+09:00 Subject: Re: OpenSSL::Cipher dad decrypt On 2 May 2009, at 21:45, Pål Bergström wrote: > I'm trying to implement a simple encrypt and decrypt function in > Rails. > I've found this Ruby script using OpenSSL::Cipher::Cipher. > > When I try with the "wrong" KEY value, just to test it, I get an error > saying "bad decrypt". How can I avoid the error, or read the error > so I > can stop the script? Show us the code you're actually using and we can make constructive suggestions :) Also whilst the particular techniques may or may not be applicable, you can find some examples of doing OpenSSL crypto in the presentations linked in my sig: the Semantic DNS presentation has a substantial example (using AES). Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason