Documentation
¶
Index ¶
- func Base64Encoder(in []byte, buf io.Writer) error
- func NopEncoder(in []byte, buf io.Writer) error
- type EncryptOpts
- 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) DecryptStructuredAsMap(input io.Reader, format string) (interface{}, error)
- func (s *Envelope) Encrypt(alias string, input io.Reader) ([]byte, error)
- func (s *Envelope) EncryptWithOpts(alias string, input io.Reader, opts EncryptOpts) ([]byte, error)
- func (s *Envelope) InjectEncrypted(alias string, input io.Reader, key string, value io.Reader, format string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EncryptOpts ¶ added in v0.1.0
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
func (*Envelope) DecryptStructuredAsMap ¶ added in v0.1.0
func (*Envelope) Encrypt ¶
Encrypt will encrypt the input as a blob using the key given and default options
func (*Envelope) EncryptWithOpts ¶ added in v0.1.0
EncryptWithOpts will encypt the input as a blob using the key given and the options specified
Source Files
¶
Click to show internal directories.
Click to hide internal directories.