From 1e601cd6f1a4be0f3736467e08c6de8603b6aad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Mon, 3 Jun 2013 17:43:06 +0200 Subject: use generated private key fro m setUp() --- apps/files_encryption/tests/crypt.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apps/files_encryption/tests/crypt.php') diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php index 74f91e9b037..bb84ff26907 100755 --- a/apps/files_encryption/tests/crypt.php +++ b/apps/files_encryption/tests/crypt.php @@ -228,14 +228,12 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { function testDecryptPrivateKey() { - $keypair = Encryption\Crypt::createKeypair(); - // test successful decrypt - $crypted = Encryption\Crypt::symmetricEncryptFileContent($keypair['privateKey'], 'hat'); + $crypted = Encryption\Crypt::symmetricEncryptFileContent($this->genPrivateKey, 'hat'); $decrypted = Encryption\Crypt::decryptPrivateKey($crypted, 'hat'); - $this->assertEquals($keypair['privateKey'], $decrypted); + $this->assertEquals($this->genPrivateKey, $decrypted); //test private key decrypt with wrong password $wrongPasswd = Encryption\Crypt::decryptPrivateKey($crypted, 'hat2'); -- cgit v1.2.3