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

Method Encrypt

hcvault/keysource.go:222–224  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

220//
221// Consider using EncryptContext instead.
222func (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.

Callers 4

EncryptIfNeededMethod · 0.95
TestMasterKey_EncryptFunction · 0.95
TestMasterKey_DecryptFunction · 0.95

Calls 1

EncryptContextMethod · 0.95

Tested by 3

TestMasterKey_EncryptFunction · 0.76
TestMasterKey_DecryptFunction · 0.76