Encrypt takes a SOPS data key, encrypts it with Vault Transit, and stores the result in the EncryptedKey field. Consider using EncryptContext instead.
(dataKey []byte)
| 220 | // |
| 221 | // Consider using EncryptContext instead. |
| 222 | func (key *MasterKey) Encrypt(dataKey []byte) error { |
| 223 | return key.EncryptContext(context.Background(), dataKey) |
| 224 | } |
| 225 | |
| 226 | // EncryptContext takes a SOPS data key, encrypts it with Vault Transit, and stores |
| 227 | // the result in the EncryptedKey field. |