note 81686 added to ref.openssl
| From: | stephen_at_liberty-irm_dot_com at osu1 dot php dot net | Date: | Sun, 09 Mar 2008 23:14:04 +0000 |
| Subject: | note 81686 added to ref.openssl | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136882@lists.php.net to get a copy of this message | ||
This note is primarily aimed at folks storing encrypted things in MySQL as I'm unfamiliar with
other database setups. If you store, for example, a credit card number that has been encrypted by
openssl_public_encrypt inside of a database, the column type for the column you are storing the
number in must be a blob. This is because "the result might contain arbitrary byte values"
(MySQL Reference Manual). Basically, if you try to store it in a VARCHAR, LONGTEXT, etc, certain
parts of the encrypted data may be dropped, truncated, etc. This will of course make the data
impossible to decrypt. Hopefully this will help someone, because it had me stumped for about an
hour!
----
Server IP: 208.69.120.35
Probable Submitter: 209.23.97.142
----
Manual Page -- http://www.php.net/manual/en/ref.openssl.php
Edit -- https://master.php.net/note/edit/81686
Del: integrated -- https://master.php.net/note/delete/81686/integrated
Del: useless -- https://master.php.net/note/delete/81686/useless
Del: bad code -- https://master.php.net/note/delete/81686/bad+code
Del: spam -- https://master.php.net/note/delete/81686/spam
Del: non-english -- https://master.php.net/note/delete/81686/non-english
Del: in docs -- https://master.php.net/note/delete/81686/in+docs
Del: other reasons-- https://master.php.net/note/delete/81686
Reject -- https://master.php.net/note/reject/81686
Search -- https://master.php.net/manage/user-notes.php