Versions in this module Expand all Collapse all v6 v6.4.2 Aug 17, 2020 Changes in this version + var ErrDataIsEncrypted = errors.New("failed to decrypt data that is encrypted") + var ErrDataIsNotEncrypted = errors.New("failed to decrypt data that is not encrypted") + type Key struct + func NewKey(a cipher.AEAD) *Key + func (e Key) Decrypt(text string, n *string) ([]byte, error) + func (e Key) Encrypt(plaintext []byte) (string, *string, error) + type NoEncryption struct + func NewNoEncryption() *NoEncryption + func (n NoEncryption) Decrypt(text string, nonce *string) ([]byte, error) + func (n NoEncryption) Encrypt(plaintext []byte) (string, *string, error) + type Strategy interface + Decrypt func(string, *string) ([]byte, error) + Encrypt func([]byte) (string, *string, error)