Пример #1
0
 public function testEncryptionUsingPrivateKeyBase64Encryption()
 {
     $rsa = new RSA(array('pemString' => $this->_testPemString));
     $encrypted = $rsa->encrypt('1234567890', $rsa->getPrivateKey(), RSA::BASE64);
     $this->assertEquals('1234567890', $rsa->decrypt($encrypted, $rsa->getPublicKey(), RSA::BASE64));
 }