From: Eleanor McHugh Date: 2009-05-04T07:14:44+09:00 Subject: Re: OpenSSL::Cipher dad decrypt On 3 May 2009, at 19:03, Pål Bergström wrote: > Eleanor McHugh wrote: > >> begin >> c = OpenSSL::Cipher::Cipher.new("aes-256-cbc") >> c.decrypt >> c.key = key = Digest::SHA2.digest(passo) >> d = c.update(etext) >> d << c.final >> d >> rescue OpenSSL::CipherError => e >> "incorrect password" >> rescue Exception => e >> "unknown error" >> end >> > > Thanks. Got it working. :-) Excellent :) Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason