Documentation
¶
Index ¶
- type Envelope
- func (s *Envelope) AddKey(alias string, masterKey string, context map[string]string) (string, error)
- func (s *Envelope) Decrypt(input io.Reader) ([]byte, error)
- func (s *Envelope) DecryptStructured(input io.Reader, format string) ([]byte, error)
- func (s *Envelope) Encrypt(alias string, input io.Reader) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct { Keyring keyring.Keyring Prefix string StructuredErrorBehaviour func(error) (traverser.Op, error) }
Envelope holds the configuration and keyring
func WithYamlKeyring ¶
WithYamlKeyring initializes Envelope with a yaml file based keyring
func (*Envelope) AddKey ¶
func (s *Envelope) AddKey(alias string, masterKey string, context map[string]string) (string, error)
AddKey will add the given key to the keyring with alias & context
func (*Envelope) Decrypt ¶
Decrypt will decrypt the input as a blob and return the decrypted value as a byte array
func (*Envelope) DecryptStructured ¶
DecryptStructured will parse the input as format and use the encryption prefix to automatically identify and decrypt encrypted values
Source Files
¶
Click to show internal directories.
Click to hide internal directories.