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

Method decryptWithAge

keyservice/server.go:161–168  ·  view source on GitHub ↗
(key *AgeKey, ciphertext []byte)

Source from the content-addressed store, hash-verified

159}
160
161func (ks *Server) decryptWithAge(key *AgeKey, ciphertext []byte) ([]byte, error) {
162 ageKey := age.MasterKey{
163 Recipient: key.Recipient,
164 }
165 ageKey.EncryptedKey = string(ciphertext)
166 plaintext, err := ageKey.Decrypt()
167 return []byte(plaintext), err
168}
169
170// Encrypt takes an encrypt request and encrypts the provided plaintext with the provided key, returning the encrypted
171// result

Callers 1

DecryptMethod · 0.95

Calls 1

DecryptMethod · 0.95

Tested by

no test coverage detected