* @param string $password
* @return bool|string
*/
- public function decryptPrivateKey($privateKey, $password) {
+ public function decryptPrivateKey($privateKey, $password = '') {
$header = $this->parseHeader($privateKey);
* @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);
$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();
->willReturn(true);
$this->cryptMock->expects($this->once())
- ->method('symmetricDecryptFileContent')
+ ->method('decryptPrivateKey')
->willReturn(true);
$this->cryptMock->expects($this->once())