Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareWithHash ¶
CompareWithHash verifies a plain text password against a bcrypt hash. Returns true if the password matches the hash, false otherwise.
func CreateHash ¶
CreateHash generates a bcrypt hash from a plain text password. Returns the hashed password as a string or an error if hashing fails.
func Decrypt ¶
func Decrypt(encryptedData models.EncryptReturnType) (interface{}, error)
Decrypt decrypts AES-encrypted data in CBC mode and returns the original data. Supports Base64 or hex-encoded input. Returns the decrypted data or an error if decryption fails.
func Encrypt ¶
func Encrypt(data interface{}) (*models.EncryptReturnType, error)
Encrypt encrypts data using AES in CBC mode and returns an encoded payload. Supports Base64 or hex encoding for the ciphertext. Returns the encrypted payload or an error if encryption fails.
Types ¶
This section is empty.