aes

package
v0.0.0-...-ebe581b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptUsingAESGCM

func DecryptUsingAESGCM(key AESKey, ciphertext []byte, dst []byte) ([]byte, error)

DecryptUsingAESGCM decrypt AES256-GCM

func EncryptUsingAESGCM

func EncryptUsingAESGCM(key AESKey, plaintext []byte, dst []byte) ([]byte, error)

EncryptUsingAESGCM encrypt using AES_GCM

Types

type AESKey

type AESKey struct {
	Key   []byte // 32 bytes
	Nonce []byte // 12 bytes = GCM.NonceSize
	AD    []byte // optional
}

Jump to

Keyboard shortcuts

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