Encrypt takes a SOPS data key, encrypts it with GCP KMS, and stores the result in the EncryptedKey field. Consider using EncryptContext instead.
(dataKey []byte)
| 162 | // |
| 163 | // Consider using EncryptContext instead. |
| 164 | func (key *MasterKey) Encrypt(dataKey []byte) error { |
| 165 | return key.EncryptContext(context.Background(), dataKey) |
| 166 | } |
| 167 | |
| 168 | // EncryptContext takes a SOPS data key, encrypts it with GCP KMS, and stores the |
| 169 | // result in the EncryptedKey field. |