(key *PgpKey, plaintext []byte)
| 22 | } |
| 23 | |
| 24 | func (ks *Server) encryptWithPgp(key *PgpKey, plaintext []byte) ([]byte, error) { |
| 25 | pgpKey := pgp.NewMasterKeyFromFingerprint(key.Fingerprint) |
| 26 | err := pgpKey.Encrypt(plaintext) |
| 27 | if err != nil { |
| 28 | return nil, err |
| 29 | } |
| 30 | return []byte(pgpKey.EncryptedKey), nil |
| 31 | } |
| 32 | |
| 33 | func (ks *Server) encryptWithKms(key *KmsKey, plaintext []byte) ([]byte, error) { |
| 34 | kmsKey := kmsKeyToMasterKey(key) |
no test coverage detected