diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-06-03 17:43:06 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-06-03 17:43:06 +0200 |
commit | 1e601cd6f1a4be0f3736467e08c6de8603b6aad0 (patch) | |
tree | cb958c7dd215467699029578f16e4b21a39e49cc /apps | |
parent | 35c91ff9010f84aa204030f4bb60f36dca1cb664 (diff) | |
download | nextcloud-server-1e601cd6f1a4be0f3736467e08c6de8603b6aad0.tar.gz nextcloud-server-1e601cd6f1a4be0f3736467e08c6de8603b6aad0.zip |
use generated private key fro m setUp()
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/files_encryption/tests/crypt.php | 6 |
1 files changed, 2 insertions, 4 deletions
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'); |