From: Jason Roelofs Date: 2007-06-15T00:41:53+09:00 Subject: Re: ezcrypto ------=_Part_42834_33204584.1181835714195 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline And you are posting this to Ruby-lang why? Sounds like you didn't even try to contact the author of EzCrypto. http://ezcrypto.rubyforge.org/ And too bad, I'm going to tell you to RTFM. I checked it out (I have no prior knowledge of this library) and I think I already know what's wrong with your code: Key#new: "Initialize the key with raw unencoded binary key data. This needs to be at least 16 bytes long for the default aes-128 algorithm." It wants "raw binary key data". A Ruby string is not "raw binary key data". Otherwise, I was unable to get it working with blowfish or aes-128-cbc, so either go get a hold of the author and ask, try to fix the problem yourself, or assume that the library is broken (it was released in Sept 2006) and move on. Jason On 6/14/07, Bob wrote: > > require 'ezcrypto' > > key = EzCrypto::Key.new "1234567812345678", :algorithm=>"blowfish" > key.encrypt_file "en.dll", "crypt.dll" > key.decrypt_file "crypt.dll","en.dll" > > encrypts the 4,382,208 bytes file into a 29,003 bytes file decrypting > this then obviously fails. This code works ok with small text files ok. > > Oh please don't RTFM me cos the documentation is up to the usual Ruby > standard ;) > Ruby, so much power so little documentation. > > Thanks for any help, > Bob > > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_42834_33204584.1181835714195--