Forum Moderators: coopster

Message Too Old, No Replies

mcrypt trouble

having trouble decrypting an encrypted message

         

islandskater43

3:43 pm on Nov 9, 2006 (gmt 0)

10+ Year Member



I am having trouble decrypting a message that I encrypted using the mcrypt_encrypt function in php. I am passing the randomly generated iv along with the encrypted data, and using it to decrypt. I'm not getting any errors, but some lines don't completely decrypt.

Some of the lines that are encrypted will decypt perfectly fine, while others will not completely decrypt. The majority of these lines (about 20 out of 40) will have the last part missing. Below, I have some examples of both good and bad decrypted lines. The first and last are bad. Second and third are good.


'MEMBER','6/25/2007','','','04/15/2008','22 Any Street','Winsted, CT2IM `VgeK#d
'MEMBER','11/2006','','','04/012007','22 Any Street','Winsted, CT 06098','860-379-3333','860-307-1111','16-I','d41d8cd98f00b204e9800998ecf8427e'
'MEMBER','03/2007','','','10/01/2006','99 Any St.','Winsted, CT 06098','860-379-1111','860-567-7545','4-I','d41d8cd98f00b204e9800998ecf8427e'
'MEMBER','','','','04/01/2007','238 Any Road','West Hartland, CT 06091','860-379-8888','860-738-3333','11-I','d41d8cd9kq-~jDB{GU:Y

Thanks,

-Matt

eelixduppy

6:55 am on Nov 10, 2006 (gmt 0)



Welcome to WebmasterWorld, islandskater43!

Can you post some sample code?

I'm thinking it has to do with the padding of \0 to the data, otherwise something else isn't correct.