protected function getEncryptionKey(Share $share, $passPhrase) { return KeyGen::decrypt($share->getEncryptedKey(), $share->getUser()->getPrivateKey(), $passPhrase); }
public function setPlainPassword($password) { $keyPair = KeyGen::generateKeyPair($password); $this->setPrivateKey($keyPair->privateKey); $this->setPublicKey($keyPair->publicKey); parent::setPlainPassword($password); }