crypt

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChacha20poly1305Key

func NewChacha20poly1305Key() []byte

Types

type Crypt

type Crypt struct {
	// contains filtered or unexported fields
}

func NewCrypt

func NewCrypt(key []byte, ads []byte) *Crypt

func (*Crypt) Decrypt

func (c *Crypt) Decrypt(encrypted []byte) ([]byte, bool)

func (*Crypt) Encrypt

func (c *Crypt) Encrypt(msg []byte) []byte

func (*Crypt) GenNonce

func (c *Crypt) GenNonce(length int) []byte

Jump to

Keyboard shortcuts

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