note 3671 modified in ref.mcrypt by danbrown

From: Date: Mon, 13 Dec 2010 16:29:01 +0000
Subject: note 3671 modified in ref.mcrypt by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-174879@lists.php.net to get a copy of this message
the encrypted result data maybe binary data and It make errors in sql query. so use the base64_encode/base64_decode function with mcrypt() try below <?php base64_encode(mcrypt_ecb(MCRYPT_BLOWFISH,$key,$input,MCRYPT_ENCRYPT)); mcrypt_ecb(MCRYPT_BLOWFISH,$key,base64_decode($input),MCRYPT_DECRYPT); ?> --was-- the encrypted result data maybe binary data and It make errors in sql query. so use the base64_encode/base64_decode function with mcrypt() try below base64_encode(mcrypt_ecb(MCRYPT_BLOWFISH,$key,$input,MCRYPT_ENCRYPT)); mcrypt_ecb(MCRYPT_BLOWFISH,$key,base64_decode($input),MCRYPT_DECRYPT); http://php.net/manual/en/ref.mcrypt.php

« previous php.notes (#174879) next »