Documentation
¶
Overview ¶
Package crypto provides AES-256-GCM encryption/decryption utilities
Index ¶
Constants ¶
View Source
const (
// EncryptedPrefix is prepended to encrypted values to identify them.
EncryptedPrefix = "enc:"
)
Variables ¶
Functions ¶
func Decrypt ¶
Decrypt decrypts ciphertext using AES-256-GCM with the provided key. Expects base64 encoded ciphertext with "enc:" prefix.
func Encrypt ¶
Encrypt encrypts plaintext using AES-256-GCM with the provided key. Returns base64 encoded ciphertext with "enc:" prefix.
func IsEncrypted ¶
IsEncrypted checks if a value is encrypted by looking for the prefix.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.