cleanup unused method legacyKeyRecryptKeyfile

This commit is contained in:
Florin Peter 2013-05-31 22:49:32 +02:00
parent 8761242f52
commit 46e5e9bd73
2 changed files with 0 additions and 41 deletions

View File

@ -637,28 +637,4 @@ class Crypt {
}
}
/**
* @param $legacyEncryptedContent
* @param $legacyPassphrase
* @param $publicKeys
* @return array
*/
public static function legacyKeyRecryptKeyfile($legacyEncryptedContent, $legacyPassphrase, $publicKeys) {
$decrypted = self::legacyBlockDecrypt($legacyEncryptedContent, $legacyPassphrase);
// Encrypt plain data, generate keyfile & encrypted file
$cryptedData = self::symmetricEncryptFileContentKeyfile($decrypted);
// Encrypt plain keyfile to multiple sharefiles
$multiEncrypted = Crypt::multiKeyEncrypt($cryptedData['key'], $publicKeys);
return array(
'data' => $cryptedData['encrypted'],
'filekey' => $multiEncrypted['data'],
'sharekeys' => $multiEncrypted['keys']
);
}
}

View File

@ -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();