crypto

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext, key string) (string, error)

Decrypt decrypts base64 encoded string using AES-GCM It supports reading old plaintext data for migration (returns original if not matching encrypted format)

func Encrypt

func Encrypt(plaintext, key string) (string, error)

Encrypt encrypts plain text string into base64 encoded string using AES-GCM key must be 32 bytes for AES-256 Format: v1:nonce:ciphertext

Types

This section is empty.

Jump to

Keyboard shortcuts

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