From: Rodrigo Dominguez Date: 2006-09-25T23:04:05+09:00 Subject: Re: cryptography (RSA) > Hi, > > i think that you used the openssl-ruby-bindings in a wrong way. > First, to set the encryption key, you have to use > des.key = key (not des.encrypt(key)). > Second, when using a 128-bit Algorithm, your key must be 128-bit. > Your key is only 8*7=56 bit. > Third, the encryption algorithms not only need the same key, they also > need the same iv (initialisation vector) to show the same results. > In ruby it is > des.iv = iv. > I bet google shows enough examples how to use openssl in ruby the right > way. > > Regards, > Roland thank you very much for the answer, I didn't know about the key length and the iv vector, I will try again, thank you -- Posted via http://www.ruby-forum.com/.