[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Problems with OpenSSL => RSA
From:       "Caleb Tennis" <caleb () aei-tech ! com>
Date:       2007-11-27 15:05:20
Message-ID: 56277.192.168.2.159.1196175811.squirrel () www ! aei-tech ! com
[Download RAW message or body]

> It doesn't work :-(  The error message doesn't make sense to me, so
> I'm hoping someone can enlighten me.  Maybe I'm not using the
> libraries correctly.  Thanks for the help.

There's a good explanation here:

http://stuff-things.net/2007/06/11/encrypting-sensitive-data-with-ruby-on-rails/

The last paragraph is what you're looking for.

Basically, you can only encrypt a message with length up to your key size in bytes
(128) - 11 for padding, which is 117 bytes.  Depending on your total message size,
you'll have to either use a bigger key (which will make the encrypt/decrypt slower)
or use a different encryption/decryption model.

Caleb



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic