crypto

package
v0.0.0-...-b25413d Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotSet = errors.New("CF_ENC_KEY not set")

ErrKeyNotSet is returned when CF_ENC_KEY is missing.

Functions

func CheckEnv

func CheckEnv() error

CheckEnv validates that CF_ENC_KEY is set and a valid length.

func Decrypt

func Decrypt(ciphertext []byte) ([]byte, error)

Decrypt decrypts ciphertext using AES-GCM with key from CF_ENC_KEY.

func Encrypt

func Encrypt(plain []byte) ([]byte, error)

Encrypt encrypts plaintext using AES-GCM with key from CF_ENC_KEY.

Types

This section is empty.

Jump to

Keyboard shortcuts

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