Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('Crypt/RSA.php');
- $rsa = new Crypt_RSA();
- $rsa->loadKey('...'); // public key
- $plaintext = '...';
- //$rsa->setEncryptionMode(CRYPT_RSA_ENCRYPTION_OAEP);
- $ciphertext = $rsa->encrypt($plaintext);
- $rsa->loadKey('...'); // private key
- echo $rsa->decrypt($ciphertext);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement