note 95307 added to function.openssl-public-encrypt
| From: | public at grik dot net | Date: | Fri, 25 Dec 2009 18:10:19 +0000 |
| Subject: | note 95307 added to function.openssl-public-encrypt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164326@lists.php.net to get a copy of this message | ||
openssl_private_encrypt() has a low limit for the length of the data it can encrypt due to the
nature of the algorithm.
To encrypt the larger data you can use openssl_encrypt() with a random password (like
sha1(microtime(true))), and encrypt the password with openssl_public_encrypt().
This way the data can be encrypted with a public key and decrypted with the private one.
----
Server IP: 69.147.83.197
Probable Submitter: 91.124.212.215
----
Manual Page -- http://www.php.net/manual/en/function.openssl-public-encrypt.php
Edit -- https://master.php.net/note/edit/95307
Del: integrated -- https://master.php.net/note/delete/95307/integrated
Del: useless -- https://master.php.net/note/delete/95307/useless
Del: bad code -- https://master.php.net/note/delete/95307/bad+code
Del: spam -- https://master.php.net/note/delete/95307/spam
Del: non-english -- https://master.php.net/note/delete/95307/non-english
Del: in docs -- https://master.php.net/note/delete/95307/in+docs
Del: other reasons-- https://master.php.net/note/delete/95307
Reject -- https://master.php.net/note/reject/95307
Search -- https://master.php.net/manage/user-notes.php