crypto

package
v0.0.0-...-3eb47bd Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppCryptoSecret = "6KYQBP847D4ATSFA"
)

Variables

This section is empty.

Functions

func DecryptText

func DecryptText(encryptedHex string) (string, error)

DecryptText decrypts using the default AppCryptoSecret

func DecryptTextWithKey

func DecryptTextWithKey(encryptedHex, secret string) (string, error)

DecryptTextWithKey decrypts an AES-256-CBC encrypted text using a secret.

func EncryptPasswordHash

func EncryptPasswordHash(password, encryptedSalt string) (string, error)

EncryptPasswordHash encrypts a password for the login flow

func EncryptText

func EncryptText(plainText string) (string, error)

EncryptText encrypts using the default AppCryptoSecret

func EncryptTextWithKey

func EncryptTextWithKey(plainText, secret string) (string, error)

EncryptTextWithKey encrypts a plain text using AES-256-CBC with a secret.

func PassToHash

func PassToHash(password, saltHex string) (string, error)

PassToHash generates a password hash using PBKDF2 with SHA1.

Types

This section is empty.

Jump to

Keyboard shortcuts

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