I'm encrypting/decrypting data with Crypt::Rijndael. I've encrypted and decrypted many pieces of data without any trouble. Suddenly I've encountered a piece of data that won't decrypt. I get the error:
encrypt: datasize not multiple of blocksize (16 bytes) at z.pl line 25.
I've tested other pieces of data encrypted the same way and it works. Is there anything encrypting would do that would make decrypting impossible (like put bad random characters or spaces or something that would throw the decryption off)?
Here's some code for more detail:
$iv = 'key_that_is_16_characters_long';
$cipher = Crypt::Rijndael->new( "a" x 32, Crypt::Rijndael::MODE_CBC );
I do use these characters in $iv: $*@ (not sure if that matters). I've been made aware this isn't very secure ("a"x32), but I'm not so much worried about that right now.