public function decrypt($cipher, $fingerprint)
{
if ($fingerprint === null || !isset($this->keys[$fingerprint])) {
throw new InvalidKeyPairIdException('Invalid keypair fingerprint given', 1231438861);
}
$keyPair = $this->keys[$fingerprint];
if ($keyPair['usedForPasswords']) {
throw new DecryptionNotAllowedException('You are not allowed to decrypt passwords!', 1233655350);
}
return $this->decryptWithPrivateKey($cipher, $keyPair['privateKey']);
}