make legacyDecrypt() private als always call legacyBlockDecrypt() from other classes
This commit is contained in:
parent
8b35578833
commit
df22a7c495
|
@ -76,7 +76,7 @@ class Hooks {
|
|||
&& $encLegacyKey = $userView->file_get_contents( 'encryption.key' )
|
||||
) {
|
||||
|
||||
$plainLegacyKey = Crypt::legacyDecrypt( $encLegacyKey, $params['password'] );
|
||||
$plainLegacyKey = Crypt::legacyBlockDecrypt( $encLegacyKey, $params['password'] );
|
||||
|
||||
$session->setLegacyKey( $plainLegacyKey );
|
||||
|
||||
|
|
|
@ -607,7 +607,7 @@ class Crypt
|
|||
*
|
||||
* This function decrypts an content
|
||||
*/
|
||||
public static function legacyDecrypt( $content, $passphrase = '' ) {
|
||||
private static function legacyDecrypt( $content, $passphrase = '' ) {
|
||||
|
||||
$bf = self::getBlowfish( $passphrase );
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ class Proxy extends \OC_FileProxy
|
|||
&& isset( $_SESSION['legacyenckey'] )
|
||||
&& Crypt::isEncryptedMeta( $path )
|
||||
) {
|
||||
$plainData = Crypt::legacyDecrypt( $data, $session->getLegacyKey() );
|
||||
$plainData = Crypt::legacyBlockDecrypt( $data, $session->getLegacyKey() );
|
||||
}
|
||||
|
||||
\OC_FileProxy::$enabled = $proxyStatus;
|
||||
|
|
|
@ -515,7 +515,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
|
|||
*/
|
||||
function testLegacyDecryptShort($crypted) {
|
||||
|
||||
$decrypted = Encryption\Crypt::legacyDecrypt($crypted, $this->pass);
|
||||
$decrypted = Encryption\Crypt::legacyBlockDecrypt($crypted, $this->pass);
|
||||
|
||||
$this->assertEquals($this->dataShort, $decrypted);
|
||||
|
||||
|
@ -543,7 +543,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
|
|||
*/
|
||||
function testLegacyDecryptLong($crypted) {
|
||||
|
||||
$decrypted = Encryption\Crypt::legacyDecrypt($crypted, $this->pass);
|
||||
$decrypted = Encryption\Crypt::legacyBlockDecrypt($crypted, $this->pass);
|
||||
|
||||
$this->assertEquals($this->dataLong, $decrypted);
|
||||
|
||||
|
@ -560,7 +560,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
|
|||
$encKey = Encryption\Crypt::legacyCreateKey($this->pass);
|
||||
|
||||
// Decrypt key
|
||||
$key = Encryption\Crypt::legacyDecrypt($encKey, $this->pass);
|
||||
$key = Encryption\Crypt::legacyBlockDecrypt($encKey, $this->pass);
|
||||
|
||||
$this->assertTrue(is_numeric($key));
|
||||
|
||||
|
|
Loading…
Reference in New Issue