NYCPHP Meetup

NYPHP.org

[nycphp-talk] mcrypt_decrypt- null bytes

Jeff Siegel jsiegel1 at optonline.net
Sun Mar 7 11:51:48 EST 2004


You're on the right track.

Found the following:

http://us3.php.net/manual/en/function.mcrypt-generic.php

It notes that: "The data is padded with "\0" to make sure the length of 
the data is n * blocksize."

Jeff

Michael Southwell wrote:

> At 08:37 AM 3/7/2004, you wrote:
> 
>> When using mcrypt_decrypt, it seems to add null bytes when decrypting. 
>> The trim function gets rid of it but just wondering if the null bytes 
>> at the end is normal behavior.
> 
> 
> wild guess:  this has something to do with block mode:  see 
> function.mcrypt-enc-is-block-algorithm-mode.html
> 
> 
> 
> Michael G. Southwell =================================
> DNEBA Enterprises
> 81 South Road
> Bloomingdale, NJ 07403-1419
> 973/492-7873 (voice and fax)
> southwell at dneba.com
> http://www.dneba.com
> ======================================================
> 
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
> 




More information about the talk mailing list