public function testEncryptionWithPublicKey() { $publicKey = new Rsa\PublicKey($this->_testCertificateString); $privateKey = new Rsa\PrivateKey($this->_testPemString); $encrypted = $publicKey->encrypt('1234567890'); $this->assertEquals('1234567890', $privateKey->decrypt($encrypted)); }