(key *AgeKey, ciphertext []byte)
| 159 | } |
| 160 | |
| 161 | func (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 |