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

Function encryptPayload

hcvault/keysource.go:342–347  ·  view source on GitHub ↗

encryptPayload returns the payload for an encrypt request of the dataKey.

(dataKey []byte)

Source from the content-addressed store, hash-verified

340
341// encryptPayload returns the payload for an encrypt request of the dataKey.
342func encryptPayload(dataKey []byte) map[string]interface{} {
343 encoded := base64.StdEncoding.EncodeToString(dataKey)
344 return map[string]interface{}{
345 "plaintext": encoded,
346 }
347}
348
349// encryptedKeyFromSecret attempts to extract the encrypted key from the data
350// of the provided secret.

Callers 2

EncryptContextMethod · 0.85
TestMasterKey_DecryptFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestMasterKey_DecryptFunction · 0.68