Re: [PHP] Encrypt then decrypt yields extra dots at end

2009-09-09 Thread Ben Dunlap
I thought this code: $enc=mcrypt_ecb(MCRYPT_RIJNDAEL_256,salt123,encrypt_me,MCRYPT_ENCRYPT); $dec=mcrypt_ecb(MCRYPT_RIJNDAEL_256,salt123,$enc,MCRYPT_DECRYPT); echo $dec; would yield encrypt_me. The actual result is encrypt_me.. (bunch of extra dots). Why, and how do I

[PHP] Encrypt then decrypt yields extra dots at end

2009-09-07 Thread Kelly Jones
I thought this code: $enc=mcrypt_ecb(MCRYPT_RIJNDAEL_256,salt123,encrypt_me,MCRYPT_ENCRYPT); $dec=mcrypt_ecb(MCRYPT_RIJNDAEL_256,salt123,$enc,MCRYPT_DECRYPT); echo $dec; would yield encrypt_me. The actual result is encrypt_me.. (bunch of extra dots). Why, and how do I fix