/** * @return string */ protected function getEncryptedSecretKey() { $encryptedSecretKey = $this->cryptService->encryptRSA(json_encode(array("secret" => $this->secretKey, "stamped" => $this->getLaunchKeyDateString())), $this->getPublicKey(), false); return $encryptedSecretKey; }
public function testEncryptRSAPlainTextDecrypts() { $actual = $this->service->decryptRSA($this->service->encryptRSA(static::UNENCRYPTED, static::PUBLIC_KEY, false), false); $this->assertEquals(static::UNENCRYPTED, $actual); }