chacha20poly1305

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptAndVerify

func DecryptAndVerify(key, nonce, message []byte, mac [16]byte, add []byte) ([]byte, error)

DecryptAndVerify returns the chacha20 decrypted messages. An error is returned when the poly1305 message authenticator (seal) could not be verified. Nonce should be 8 byte.

func EncryptAndSeal

func EncryptAndSeal(key, nonce, message []byte, add []byte) ([]byte, [16]byte, error)

EncryptAndSeal returns the chacha20 encrypted message and poly1305 message authentictor (also referred as seals) Nonce should be 8 byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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