crypto

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encryptor

type Encryptor struct {
	// contains filtered or unexported fields
}

func NewEncryptor

func NewEncryptor(key string) (*Encryptor, error)

func (*Encryptor) Decrypt

func (e *Encryptor) Decrypt(encoded string) (string, error)

func (*Encryptor) DecryptCompat

func (e *Encryptor) DecryptCompat(value string) (string, error)

DecryptCompat accepts the current prefixed ciphertext format, older unprefixed ciphertexts, and legacy plaintext values that were stored before encryption was enabled in the database.

func (*Encryptor) Encrypt

func (e *Encryptor) Encrypt(plaintext string) (string, error)

Jump to

Keyboard shortcuts

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