note 28897 deleted from function.mcrypt-ecb by didou
| From: | didou@php.net | Date: | Sat, 09 Aug 2003 03:21:39 +0000 |
| Subject: | note 28897 deleted from function.mcrypt-ecb by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53720@lists.php.net to get a copy of this message | ||
Note Submitter: BrunoUsesBBEdit
----
[Editor's Note]
It may be necessary to encode an encrypted string before storing it in your database. base64_encode
and base64_decode are one option.
I'm not sure about the specifics yet, but here is a warning: It appears that Oracle has a
problem with some of the characters that this function may return.
Here is an example:
$valueToInsertIntoOracle=
mcrypt_ecb(
MCRYPT_TripleDES,
'mraw',
'cartridges',
MCRYPT_ENCRYPT,
64
);
storeInOracle($valueToInsertIntoOracle);
$valueSelectedFromOracle = getFromOracle();
$decryptedValue=
mcrypt_ecb(
MCRYPT_TripleDES,
'mraw',
$valueSelectedFromOracle,
MCRYPT_ENCRYPT,
64
);
echo $decryptedValue;
//Should return 'cartridges' but it does not. You get a garbled mess instead.