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

Method decryptWithVault

keyservice/server.go:150–159  ·  view source on GitHub ↗
(key *VaultKey, ciphertext []byte)

Source from the content-addressed store, hash-verified

148}
149
150func (ks *Server) decryptWithVault(key *VaultKey, ciphertext []byte) ([]byte, error) {
151 vaultKey := hcvault.MasterKey{
152 VaultAddress: key.VaultAddress,
153 EnginePath: key.EnginePath,
154 KeyName: key.KeyName,
155 }
156 vaultKey.EncryptedKey = string(ciphertext)
157 plaintext, err := vaultKey.Decrypt()
158 return []byte(plaintext), err
159}
160
161func (ks *Server) decryptWithAge(key *AgeKey, ciphertext []byte) ([]byte, error) {
162 ageKey := age.MasterKey{

Callers 1

DecryptMethod · 0.95

Calls 1

DecryptMethod · 0.95

Tested by

no test coverage detected