Notice the first line of the documentation?
"Crypt::CBC compliant Rijndael encryption module"
That should tell you something!
use Crypt::CBC; my $key = "a" x 32; my $cipher = Crypt::CBC->new( -cipher => 'Rijndael', -key => $key ); my $ciphertext = $cipher->encrypt($plaintext);
use Crypt::CBC; my $key = "a" x 32; my $cipher = Crypt::CBC->new( -cipher => 'Rijndael', -key => $key ); my $plaintext = $cipher->decrypt($ciphertext);
It handles padding, for you.
It handles salting for you.
It handles chaining for you.
And make sure your database field is large enough.
In reply to Re^2: decrypt problems with Crypt::Rijndael (datasize not multiple of blocksize)
by ikegami
in thread decrypt problems with Crypt::Rijndael (datasize not multiple of blocksize)
by by88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |