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-05-17 16:13:05 +0400
committerBjörn Schießle <schiessle@owncloud.com>2013-05-17 16:13:05 +0400
commit93771f735b2347eb851941a414220af7b6ccd066 (patch)
tree3a1b378f0b46fecc69ff23cc8630718675d630b0 /apps/files_encryption/tests/crypt.php
parentbf04a21973b2ca88ea35cca3261a0f415cc36559 (diff)
gremove unused code
Diffstat (limited to 'apps/files_encryption/tests/crypt.php')
-rwxr-xr-xapps/files_encryption/tests/crypt.php41
1 files changed, 0 insertions, 41 deletions
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index bfb5ca0ec8b..69fd99d9a82 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -513,48 +513,7 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
$this->assertEquals( $this->dataUrl, $decrypt );
}
-
- // What is the point of this test? It doesn't use keyEncryptKeyfile()
- function testKeyEncryptKeyfile() {
-
- # TODO: Don't repeat encryption from previous tests, use PHPUnit test interdependency instead
-
- // Generate keypair
- $pair1 = Encryption\Crypt::createKeypair();
-
- // Encrypt plain data, generate keyfile & encrypted file
- $cryptedData = Encryption\Crypt::symmetricEncryptFileContentKeyfile( $this->dataUrl );
-
- // Encrypt keyfile
- $cryptedKey = Encryption\Crypt::keyEncrypt( $cryptedData['key'], $pair1['publicKey'] );
-
- // Decrypt keyfile
- $decryptKey = Encryption\Crypt::keyDecrypt( $cryptedKey, $pair1['privateKey'] );
-
- // Decrypt encrypted file
- $decryptData = Encryption\Crypt::symmetricDecryptFileContent( $cryptedData['encrypted'], $decryptKey );
-
- $this->assertEquals( $this->dataUrl, $decryptData );
-
- }
-
- /**
- * @brief test functionality of keyEncryptKeyfile() and
- * keyDecryptKeyfile()
- */
- function testKeyDecryptKeyfile() {
-
- $encrypted = Encryption\Crypt::keyEncryptKeyfile( $this->dataShort, $this->genPublicKey );
-
- $this->assertNotEquals( $encrypted['data'], $this->dataShort );
- $decrypted = Encryption\Crypt::keyDecryptKeyfile( $encrypted['data'], $encrypted['key'], $this->genPrivateKey );
-
- $this->assertEquals( $decrypted, $this->dataShort );
-
- }
-
-
/**
* @brief test encryption using legacy blowfish method
*/