Re: seeming failure with a specific word

[email protected] (Marty Landman) Fri, 06 Jan 2006 12:57:22 -0500
Newsgroups perl.crypto
Message-ID <[email protected]>
At 06:14 AM 1/6/2006, zentara wrote:

>Hi, have you tested the encryption-decryption manually, using the same 
>values, without the web or database part?

This took a while to nail down.

>Because you may be thinking it's an encryption problem, but it may 
>actually be something like the web transfer or database transaction is 
>adding or stripping spaces(or newlines), or do some kind of encoding change.

Of course you're right. I now believe it is caused by what Mysql docs list 
as a known bug whereby trailing blanks are removed from varchar's before 
storing in the DB. At least it isn't a memory leak in my code. :)

I think the fix is going to be redefining all the encrypted varchar types 
in the table to tinytext.

Thanks for helping me focus on the right area. Makes me kind of miss the 
old mainframe days though where environment was self-contained and hex 
editors were in conspicuous supply.

Marty


Marty Landman, Face 2 Interface Inc. 845-679-9387
Webmaster's Bulletin Board: http://bbs.face2interface.com/
Web Installed Formmail: http://face2interface.com/formINSTal