diff options
Diffstat (limited to 'apps/encryption/lib/keymanager.php')
-rw-r--r-- | apps/encryption/lib/keymanager.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/encryption/lib/keymanager.php b/apps/encryption/lib/keymanager.php index 8c8c1f8fd78..47a8e7d391f 100644 --- a/apps/encryption/lib/keymanager.php +++ b/apps/encryption/lib/keymanager.php @@ -146,7 +146,7 @@ class KeyManager { Encryption::ID); // Encrypt private key empty passphrase - $encryptedKey = $this->crypt->symmetricEncryptFileContent($keyPair['privateKey'], ''); + $encryptedKey = $this->crypt->encryptPrivateKey($keyPair['privateKey'], ''); $header = $this->crypt->generateHeader(); $this->setSystemPrivateKey($this->publicShareKeyId, $header . $encryptedKey); } @@ -203,8 +203,8 @@ class KeyManager { // Save Public Key $this->setPublicKey($uid, $keyPair['publicKey']); - $encryptedKey = $this->crypt->symmetricEncryptFileContent($keyPair['privateKey'], - $password); + $encryptedKey = $this->crypt->encryptPrivateKey($keyPair['privateKey'], $password); + $header = $this->crypt->generateHeader(); if ($encryptedKey) { @@ -226,8 +226,7 @@ class KeyManager { $keyPair['publicKey'], Encryption::ID); - $encryptedKey = $this->crypt->symmetricEncryptFileContent($keyPair['privateKey'], - $password); + $encryptedKey = $this->crypt->encryptPrivateKey($keyPair['privateKey'], $password); $header = $this->crypt->generateHeader(); if ($encryptedKey) { |