encryption

package
v0.0.0-...-b6edd13 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(encryptedString string, key []byte) (string, error)

Decrypt decrypts a base64-encoded encrypted string using AES-256-GCM. The key must be the same 32-byte key used for encryption.

func Encrypt

func Encrypt(plaintext string, key []byte) (string, error)

Encrypt encrypts a string using AES-256-GCM. The key must be 32 bytes (256 bits) long. Returns base64-encoded encrypted string.

func GenerateAES256GCMEncryptionKey

func GenerateAES256GCMEncryptionKey() (encryptionKey []byte, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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