(key *PgpKey, ciphertext []byte)
| 101 | } |
| 102 | |
| 103 | func (ks *Server) decryptWithPgp(key *PgpKey, ciphertext []byte) ([]byte, error) { |
| 104 | pgpKey := pgp.NewMasterKeyFromFingerprint(key.Fingerprint) |
| 105 | pgpKey.EncryptedKey = string(ciphertext) |
| 106 | plaintext, err := pgpKey.Decrypt() |
| 107 | return []byte(plaintext), err |
| 108 | } |
| 109 | |
| 110 | func (ks *Server) decryptWithKms(key *KmsKey, ciphertext []byte) ([]byte, error) { |
| 111 | kmsKey := kmsKeyToMasterKey(key) |
no test coverage detected