crypt

package
v1.13.7 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenKey added in v1.12.2

func GenKey() ([32]byte, error)

func GenNonce added in v1.12.2

func GenNonce() ([12]byte, error)

func GetHexKey added in v1.12.2

func GetHexKey(s string) ([32]byte, error)

func GetHexNonce added in v1.12.2

func GetHexNonce(s string) ([12]byte, error)

Types

type Crypt added in v1.12.2

type Crypt interface {
	Encode(p []byte) []byte
	Reader(r io.Reader) io.Reader

	EncodeHex(p []byte) []byte
	ReaderHex(r io.Reader) io.Reader

	Decode(p []byte) ([]byte, error)
	Writer(w io.Writer) io.Writer

	DecodeHex(p []byte) ([]byte, error)
	WriterHex(w io.Writer) io.Writer
}

func New added in v1.12.2

func New(key [32]byte, nonce [12]byte) (Crypt, error)

Jump to

Keyboard shortcuts

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