diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 74f91e9b03723ef90f913d4b4fc32f43d7b93d08..bb84ff26907e4d612cf0227e91fbee1713fcb7d9 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');