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

Method decryptWithKms

keyservice/server.go:110–115  ·  view source on GitHub ↗
(key *KmsKey, ciphertext []byte)

Source from the content-addressed store, hash-verified

108}
109
110func (ks *Server) decryptWithKms(key *KmsKey, ciphertext []byte) ([]byte, error) {
111 kmsKey := kmsKeyToMasterKey(key)
112 kmsKey.EncryptedKey = string(ciphertext)
113 plaintext, err := kmsKey.Decrypt()
114 return []byte(plaintext), err
115}
116
117func (ks *Server) decryptWithGcpKms(key *GcpKmsKey, ciphertext []byte) ([]byte, error) {
118 gcpKmsKey := gcpkms.MasterKey{

Callers 1

DecryptMethod · 0.95

Calls 2

kmsKeyToMasterKeyFunction · 0.85
DecryptMethod · 0.65

Tested by

no test coverage detected