aesgcm

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedKeySize = errors.New("unsupported key size")
)

Functions

func CreateKey

func CreateKey(bits KeySize) (key []byte, err error)

func Decrypt

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

func Encrypt

func Encrypt(message, key, externalData []byte) (ciphertext, nonce []byte, err error)

Types

type KeySize

type KeySize int
const (
	AES128 KeySize = 128
	AES192 KeySize = 192
	AES256 KeySize = 257
)

func GetKeySize

func GetKeySize(bits int) (keysize KeySize, err error)

Jump to

Keyboard shortcuts

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