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

Method decryptWithGcpKms

keyservice/server.go:117–124  ·  view source on GitHub ↗
(key *GcpKmsKey, ciphertext []byte)

Source from the content-addressed store, hash-verified

115}
116
117func (ks *Server) decryptWithGcpKms(key *GcpKmsKey, ciphertext []byte) ([]byte, error) {
118 gcpKmsKey := gcpkms.MasterKey{
119 ResourceID: key.ResourceId,
120 }
121 gcpKmsKey.EncryptedKey = string(ciphertext)
122 plaintext, err := gcpKmsKey.Decrypt()
123 return []byte(plaintext), err
124}
125
126func (ks *Server) decryptWithAzureKeyVault(key *AzureKeyVaultKey, ciphertext []byte) ([]byte, error) {
127 azkvKey := azkv.MasterKey{

Callers 1

DecryptMethod · 0.95

Calls 1

DecryptMethod · 0.95

Tested by

no test coverage detected