MCPcopy
hub / github.com/getsops/sops / Encrypt

Method Encrypt

gcpkms/keysource.go:164–166  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

162//
163// Consider using EncryptContext instead.
164func (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.

Callers 2

EncryptIfNeededMethod · 0.95
TestMasterKey_EncryptFunction · 0.95

Calls 1

EncryptContextMethod · 0.95

Tested by 1

TestMasterKey_EncryptFunction · 0.76