note 50145 added to function.openssl-public-encrypt

From: Date: Sat, 19 Feb 2005 17:18:49 +0000
Subject: note 50145 added to function.openssl-public-encrypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-85243@lists.php.net to get a copy of this message
In comment below, Jeff says the input to this function is limited to "about 50 characters". On my PHP5 build, the limit is 117 characters (936 bits, strange number). That's because public key encryption is CPU intensive, and meant to be used on short values. The idea is to use this function to encrypt a secret key that is in turn used to encrypt data using a more efficient algorithm, such as RC4 or TripleDES. The recipient uses their private key to decrypt the secret, and can then decrypt the data. The openssl_seal() and openssl_open() functions do this internally, and are very well documented. You should probably use them instead. ---- Manual Page -- http://www.php.net/manual/en/function.openssl-public-encrypt.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50145 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50145&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50145&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50145&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50145&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50145&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50145&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85243) next »