encryption

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdditionalData

func AdditionalData(ctx context.Context) ([]byte, bool)

AdditionalData gets the aad value from the context.

func FromKey

func FromKey(keyValue string) (value.Transformer, error)

FromKey returns the value transformer that match the value format.

func Must

Must is used to panic when a transformer initialization failed.

func Nonce

func Nonce(ctx context.Context) ([]byte, bool)

Nonce gets the nonce value from the context.

func Register

func Register(prefix string, factory TransformerFactoryFunc)

Register a transformer with the given prefix.

func WithAdditionalData

func WithAdditionalData(ctx context.Context, value []byte) context.Context

func WithNonce

func WithNonce(ctx context.Context, value []byte) context.Context

Types

type TransformerFactoryFunc

type TransformerFactoryFunc func(string) (value.Transformer, error)

TransformerFactoryFunc is used for transformer building for encryption.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL