MCPcopy Index your code
hub / github.com/getsops/sops / kmsKeyToMasterKey

Function kmsKeyToMasterKey

keyservice/server.go:359–371  ·  view source on GitHub ↗
(key *KmsKey)

Source from the content-addressed store, hash-verified

357}
358
359func kmsKeyToMasterKey(key *KmsKey) kms.MasterKey {
360 ctx := make(map[string]*string)
361 for k, v := range key.Context {
362 value := v // Allocate a new string to prevent the pointer below from referring to only the last iteration value
363 ctx[k] = &value
364 }
365 return kms.MasterKey{
366 Arn: key.Arn,
367 Role: key.Role,
368 EncryptionContext: ctx,
369 AwsProfile: key.AwsProfile,
370 }
371}

Callers 3

encryptWithKmsMethod · 0.85
decryptWithKmsMethod · 0.85
TestKmsKeyToMasterKeyFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestKmsKeyToMasterKeyFunction · 0.68