chacha20

package
v0.0.0-...-bb1a4e7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key []byte, nonce []byte, ciphertext []byte) ([]byte, error)

func Encrypt

func Encrypt(key []byte, message []byte) ([]byte, []byte, error)

func Nonce

func Nonce() ([]byte, error)

Types

type ChachaEncoder

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

func NewChachaEncoderParams

func NewChachaEncoderParams(key []byte) *ChachaEncoder

func (*ChachaEncoder) Decrypt

func (enc *ChachaEncoder) Decrypt(ciphertext []byte, nonce []byte) ([]byte, error)

func (*ChachaEncoder) Encrypt

func (enc *ChachaEncoder) Encrypt(message []byte) ([]byte, []byte, error)

func (*ChachaEncoder) EncryptWithKey

func (enc *ChachaEncoder) EncryptWithKey(key []byte, message []byte) ([]byte, []byte, error)

Jump to

Keyboard shortcuts

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