(key *KmsKey, ciphertext []byte)
| 108 | } |
| 109 | |
| 110 | func (ks *Server) decryptWithKms(key *KmsKey, ciphertext []byte) ([]byte, error) { |
| 111 | kmsKey := kmsKeyToMasterKey(key) |
| 112 | kmsKey.EncryptedKey = string(ciphertext) |
| 113 | plaintext, err := kmsKey.Decrypt() |
| 114 | return []byte(plaintext), err |
| 115 | } |
| 116 | |
| 117 | func (ks *Server) decryptWithGcpKms(key *GcpKmsKey, ciphertext []byte) ([]byte, error) { |
| 118 | gcpKmsKey := gcpkms.MasterKey{ |
no test coverage detected