private storeKeyPair ( |
||
$publicKey | The public key | |
$privateKey | The private key | |
$usedForPasswords | boolean | TRUE if this keypair should be used to encrypt passwords (then decryption won't be allowed!). |
리턴 | string | The fingerprint which is used as an identifier for storing the key pair |
private function storeKeyPair($publicKey, $privateKey, $usedForPasswords)
{
$publicKeyFingerprint = $this->getFingerprintByPublicKey($publicKey->getKeyString());
$keyPair = [];
$keyPair['publicKey'] = $publicKey;
$keyPair['privateKey'] = $privateKey;
$keyPair['usedForPasswords'] = $usedForPasswords;
$this->keys[$publicKeyFingerprint] = $keyPair;
$this->saveKeysOnShutdown = true;
return $publicKeyFingerprint;
}