aesgcm

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrKeySize         = "key length must be 32 bytes for AES-256"
	ErrCiphertextShort = "ciphertext too short"
)

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext, key []byte) (plaintext []byte, err error)

Decrypt performs symmetric decryption of ciphertext using AES-GCM with a 32-byte key.

func Encrypt

func Encrypt(plaintext, key []byte) (ciphertext []byte, err error)

Encrypt performs symmetric encryption of plaintext using AES-GCM with a 32-byte key. It returns the ciphertext, which includes the nonce and the encrypted data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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