Versions in this module Expand all Collapse all v1 v1.0.0 Mar 6, 2026 Changes in this version + const EncryptedPrefix + const KeySize + var ErrDecryptionFailed = errors.New("decryption failed") + var ErrInvalidCiphertext = errors.New("invalid ciphertext format") + var ErrInvalidKey = errors.New("invalid encryption key") + var ErrNoKey = errors.New("encryption key not configured") + func IsEncrypted(value string) bool + type TokenEncryptor struct + func NewTokenEncryptor(key string) (*TokenEncryptor, error) + func (te *TokenEncryptor) Decrypt(ciphertext string) (string, error) + func (te *TokenEncryptor) Encrypt(plaintext string) (string, error) + func (te *TokenEncryptor) IsActive() bool + func (te *TokenEncryptor) MustDecrypt(ciphertext string) string