Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php rsa encryption

// Use phpseclib: http://phpseclib.sourceforge.net/
<?php
include('Crypt/RSA.php');

$privatekey = file_get_contents('private.key');
$rsa = new Crypt_RSA();
$rsa->loadKey($privatekey);

$plaintext = new Math_BigInteger('aaaaaa');
echo $rsa->_exponentiate($plaintext)->toBytes();
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #rsa #encryption
ADD COMMENT
Topic
Name
5+7 =