Re: Re: PHP 4.0 Bug #4932 Updated: mcrypt_ecb will add \0 to decrypted
| From: | Sascha Schumann | Date: | Fri, 16 Jun 2000 12:59:01 +0000 |
| Subject: | Re: Re: PHP 4.0 Bug #4932 Updated: mcrypt_ecb will add \0 to decrypted | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-21511@lists.php.net to get a copy of this message | ||
On Fri, 16 Jun 2000, Wico de Leeuw wrote:
> At 12:24 16-6-2000 +0000, Bug Database wrote:
> >ID: 4932
> >Updated by: sas
> >Reported By: wico@cnh.nl
> >Status: Closed
> >Bug Type: Scripting Engine problem
> >Assigned To:
> >Comments:
> >
> >You are dealing with _block_ algorithms. All these algorithms deal with
> >blocks of a fixed size. All input and output is aligned to these block
> >sizes. That means that you will have NUL bytes at the end of $decrypt
> >which need to be stripped before you can continue to use that string.
>
> Shouldn't php do that instead of the script?
No.
NUL bytes are valid data, why should PHP strip them off.
- Sascha