]> source.dussan.org Git - nextcloud-server.git/commitdiff
cleanup unused method legacyKeyRecryptKeyfile
authorFlorin Peter <github@florin-peter.de>
Fri, 31 May 2013 20:49:32 +0000 (22:49 +0200)
committerFlorin Peter <github@florin-peter.de>
Fri, 31 May 2013 20:49:32 +0000 (22:49 +0200)
apps/files_encryption/lib/crypt.php
apps/files_encryption/tests/crypt.php

index d84a4d4e3c1e1bfc4b0dd32c6ab331fb6b282b80..ced9ab7c67644b88cbb527d791ce0da3b22fb917 100755 (executable)
@@ -637,28 +637,4 @@ class Crypt {
                }\r
        }\r
 \r
-       /**\r
-        * @param $legacyEncryptedContent\r
-        * @param $legacyPassphrase\r
-        * @param $publicKeys\r
-        * @return array\r
-        */\r
-       public static function legacyKeyRecryptKeyfile($legacyEncryptedContent, $legacyPassphrase, $publicKeys) {\r
-\r
-               $decrypted = self::legacyBlockDecrypt($legacyEncryptedContent, $legacyPassphrase);\r
-\r
-               // Encrypt plain data, generate keyfile & encrypted file\r
-               $cryptedData = self::symmetricEncryptFileContentKeyfile($decrypted);\r
-\r
-               // Encrypt plain keyfile to multiple sharefiles\r
-               $multiEncrypted = Crypt::multiKeyEncrypt($cryptedData['key'], $publicKeys);\r
-\r
-               return array(\r
-                       'data' => $cryptedData['encrypted'],\r
-                       'filekey' => $multiEncrypted['data'],\r
-                       'sharekeys' => $multiEncrypted['keys']\r
-               );\r
-\r
-       }\r
-\r
 }
\ No newline at end of file
index 32156eea272446d8ccae2ff0aff4cc429ec58f70..e153a49a2c7cd903d6ba4f027931fd19c7e0fa80 100755 (executable)
@@ -569,23 +569,6 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
 
        }
 
-       /**
-        * @brief test decryption using legacy blowfish method
-        * @depends testLegacyEncryptLong
-        */
-       function testLegacyKeyRecryptKeyfileEncrypt($crypted) {
-
-               $recrypted = Encryption\Crypt::LegacyKeyRecryptKeyfile($crypted, $this->pass, array($this->genPublicKey));
-
-               $this->assertNotEquals($this->dataLong, $recrypted['data']);
-
-               return $recrypted;
-
-               # TODO: search inencrypted text for actual content to ensure it
-               # genuine transformation
-
-       }
-
        function testRenameFile() {
 
                $filename = 'tmp-' . time();