Documentation ¶
Overview ¶
Package encrypted implements an encryption codec which encodes data by encrypting and authenticating with a cipher.AEAD instance.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
A Codec implements the encoded.Codec interface and encrypts and authenticates data using a cipher.AEAD instance.
func New ¶
New constructs an encryption codec that uses the given encryption context. If opts == nil, default options are used. New will panic if aead == nil.
For AES-GCM, you can use the cipher.NewGCM constructor. For ChaCha20-Poly1305 (RFC 8439) see golang.org/x/crypto/chacha20poly1305.
Click to show internal directories.
Click to hide internal directories.