Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NoopDecrypter = noopDecrypter{} NoopEncrypter = noopEncrypter{} )
Functions ¶
func NewExternalEncrypter ¶
Types ¶
type Decrypter ¶
type Decrypter interface { // Decrypt decrypts ciphertext. The second parameter may be treated as associated data for AEAD (as abstracted in // https://datatracker.ietf.org/doc/html/rfc5116), or as contextInfo for HPKE (https://www.rfc-editor.org/rfc/rfc9180.html) Decrypt(ctx context.Context, ciphertext, contextInfo []byte) ([]byte, error) }
Decrypter is the interface for any decrypter. May be AEAD or Hybrid.
type Encrypter ¶
type Encrypter interface {
Encrypt(ctx context.Context, plaintext, contextData []byte) ([]byte, error)
}
Encrypter the interface for any encrypter implementation.
type XChaCha20Poly1305Encrypter ¶
type XChaCha20Poly1305Encrypter struct {
// contains filtered or unexported fields
}
func NewXChaCha20Poly1305EncrypterWithKey ¶
func NewXChaCha20Poly1305EncrypterWithKey(key []byte) *XChaCha20Poly1305Encrypter
func NewXChaCha20Poly1305EncrypterWithKeyResolver ¶
func NewXChaCha20Poly1305EncrypterWithKeyResolver(resolver KeyResolver) *XChaCha20Poly1305Encrypter
Click to show internal directories.
Click to hide internal directories.