chacha20poly1305

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package chacha20poly1305 implements content encryption algorithm ChaCha20/Poly1305 for COSE as defined in RFC9053. https://datatracker.ietf.org/doc/html/rfc9053#name-chacha20-and-poly1305.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckKey

func CheckKey(k key.Key) error

CheckKey checks whether the given key is a valid ChaCha20/Poly1305 key.

func GenerateKey

func GenerateKey() (key.Key, error)

GenerateKey generates a new Key with given algorithm for ChaCha20/Poly1305.

func KeyFrom

func KeyFrom(k []byte) (key.Key, error)

KeyFrom returns a Key with given algorithm and bytes for ChaCha20/Poly1305.

func New

func New(k key.Key) (key.Encryptor, error)

New creates a key.Encryptor for the given ChaCha20/Poly1305 key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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