Re: Encryption failing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(forgot to copy the list)

On Jan 16, 2008, at 5:08 PM, Richard Lynch wrote:


Is it possible that 4% of the time, you have spaces on the start/end
of the string, which get trimmed before encryption?


In this case, no. In trying to simplify the situation to narrow the possibilities of error, I am generating "random" character strings of only alphanumeric (or numeric-only) characters. Each is exactly 16 characters.



And if rijndael is one of the algorithms which requires a fixed-size
input, that also would be "bad" to trim it.


No documentation that I was able to find suggests that requirement.




Actually, I'd suggest that the encryption function has no business
trimming the text anyway.


Philosophically I agree with you, but mCrypt has this nasty habit of appending bunches of nulls to the decrypted string. So philosophical purity gives way to practical application.

Good ideas, as usual. Thank you.

Ken


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux