(key *VaultKey, ciphertext []byte)
| 148 | } |
| 149 | |
| 150 | func (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 | |
| 161 | func (ks *Server) decryptWithAge(key *AgeKey, ciphertext []byte) ([]byte, error) { |
| 162 | ageKey := age.MasterKey{ |