On 8/18/07, csnyder <[EMAIL PROTECTED]> wrote:
>
> You need to use the same initialization vector (IV) to decrypt as you
> did to encrypt. Typically, after encryption, you prepend the iv to the
> ciphertext value and store the whole thing (iv+encrypted). When you're
> ready to decrypt, you chop the iv off the front and use it to decrypt
> the ciphertext.
>
> Second, how are you generating the key? Is it a multiple of 32 characters 
> long?
>

There's a nifty little class that will do this for you in the source
code for Pro PHP Security. See ch06-encryption/mcrypt.php:
http://www.apress.com/book/supplementDownload.html?bID=437&sID=2888
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to