Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-03 19:43:06 +0400
committerBjörn Schießle <schiessle@owncloud.com>2013-06-03 19:43:06 +0400
commit1e601cd6f1a4be0f3736467e08c6de8603b6aad0 (patch)
treecb958c7dd215467699029578f16e4b21a39e49cc /apps/files_encryption/tests/crypt.php
parent35c91ff9010f84aa204030f4bb60f36dca1cb664 (diff)
use generated private key fro m setUp()
Diffstat (limited to 'apps/files_encryption/tests/crypt.php')
-rwxr-xr-xapps/files_encryption/tests/crypt.php6
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');