Do you know where your variables are? | |
PerlMonks |
Re: Encrypt String Crypt::CBCby gryphon (Abbot) |
on Jan 23, 2013 at 17:25 UTC ( [id://1014966]=note: print w/replies, xml ) | Need Help?? |
Greetings docbrown25,
From what I can tell from my very limited playing with Crypt::CBC is that to do what you want, you'll need to generate an initialization vector per each encryption, then prepend that IV to the head of the blob before encoding. You'll have to reverse that process of course when decoding and decrypting. Here's an example bit of code that randomly generates IVs, then uses these to encrypt/encode a URL. Then the decode/decrypt process pulls the IV off the head of the data.
Hope this helps.
In Section
Seekers of Perl Wisdom
|
|