chacha20poly1305

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key, ciphertext []byte, compression bool) (data []byte, err error)

func DecryptWithNonce

func DecryptWithNonce(key, ciphertext, nonce []byte, compression bool) (data []byte, err error)

func Encrypt

func Encrypt(key, data []byte, compression bool) (ciphertext []byte, err error)

func EncryptWithNonce

func EncryptWithNonce(key, data, nonce []byte, compression bool) (ciphertext []byte, err error)

Types

type Cipher

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

func Get

func Get(key []byte) (*Cipher, error)

func (*Cipher) Decrypt

func (cipher *Cipher) Decrypt(ciphertext []byte, compression bool) (data []byte, err error)

func (*Cipher) DecryptWithNonce

func (cipher *Cipher) DecryptWithNonce(ciphertext, nonce []byte, compression bool) (data []byte, err error)

func (*Cipher) Encrypt

func (cipher *Cipher) Encrypt(data []byte, compression bool) (ciphertext []byte, err error)

func (*Cipher) EncryptWithNonce

func (cipher *Cipher) EncryptWithNonce(data, nonce []byte, compression bool) (ciphertext []byte, err error)

Jump to

Keyboard shortcuts

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