[PHP] Re: occasional mcrypt problems

2003-01-18 Thread Steve Yates
Steve Yates [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... After much testing, I think I may have it. It appears that MySQL is dropping a trailing space from the value being inserted into the database! For example if the encrypted string is (.A®¢m¸¼'À

[PHP] Re: occasional mcrypt problems

2003-01-17 Thread Steve Yates
After much testing, I think I may have it. It appears that MySQL is dropping a trailing space from the value being inserted into the database! For example if the encrypted string is (.A®¢m¸¼'À MySQL stores the value without the trailing space (and it is a space). Why is that? I can

[PHP] Re: occasional mcrypt problems

2003-01-14 Thread J Smith
Steve Yates wrote: This function encrypts data. The data is padded with \0 to make sure the length of the data is n * blocksize. This function returns the encrypted data. Note that the length of the returned string can in fact be longer then the input, due to the padding of the data. I

[PHP] Re: occasional mcrypt problems

2003-01-13 Thread J Smith
Try using a different block cipher mode. When encrypting with ECB, as you said, your plaintext must have a length that is a multiple of the blocksize for the cipher. If it's anything less, you're going to get some garbage at the end of the decrypted ciphertext. I believe that mcrypt uses

[PHP] Re: occasional mcrypt problems

2003-01-13 Thread Steve Yates
J Smith [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try using a different block cipher mode. When encrypting with ECB, as you said, your plaintext must have a length that is a multiple of the blocksize Are you sure? I read the manual the other way...that