@@ -231,7 +231,7 @@ class Crypt { | |||
* @param string $password | |||
* @return bool|string | |||
*/ | |||
public function decryptPrivateKey($privateKey, $password) { | |||
public function decryptPrivateKey($privateKey, $password = '') { | |||
$header = $this->parseHeader($privateKey); | |||
@@ -273,7 +273,7 @@ class Crypt { | |||
* @return string | |||
* @throws DecryptionFailedException | |||
*/ | |||
public function symmetricDecryptFileContent($keyFileContents, $passPhrase = '', $cipher = self::DEFAULT_CIPHER) { | |||
public function symmetricDecryptFileContent($keyFileContents, $passPhrase, $cipher = self::DEFAULT_CIPHER) { | |||
// Remove Padding | |||
$noPadding = $this->removePadding($keyFileContents); | |||
@@ -337,7 +337,7 @@ class KeyManager { | |||
$uid = $this->getPublicShareKeyId(); | |||
$shareKey = $this->getShareKey($path, $uid); | |||
$privateKey = $this->keyStorage->getSystemUserKey($this->publicShareKeyId . '.privateKey'); | |||
$privateKey = $this->crypt->symmetricDecryptFileContent($privateKey); | |||
$privateKey = $this->crypt->decryptPrivateKey($privateKey); | |||
} else { | |||
$shareKey = $this->getShareKey($path, $uid); | |||
$privateKey = $this->session->getPrivateKey(); |
@@ -268,7 +268,7 @@ class KeyManagerTest extends TestCase { | |||
->willReturn(true); | |||
$this->cryptMock->expects($this->once()) | |||
->method('symmetricDecryptFileContent') | |||
->method('decryptPrivateKey') | |||
->willReturn(true); | |||
$this->cryptMock->expects($this->once()) |