password

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(password, hashedPassword string) bool

CheckPassword verifies if the provided password matches the hashed password.

func HashPassword

func HashPassword(password string, cost int) (string, error)

HashPassword hashes the given password with bcrypt.

func MD5Hash

func MD5Hash(data string) string

MD5Hash returns the MD5 hash of the input string.

func SHA1Hash

func SHA1Hash(data string) string

SHA1Hash returns the SHA-1 hash of the input string.

func SHA256Hash

func SHA256Hash(data string) string

SHA256Hash returns the SHA-256 hash of the input string.

func SHA384Hash

func SHA384Hash(data string) string

SHA384Hash returns the SHA-384 hash of the input string.

func SHA512Hash

func SHA512Hash(data string) string

SHA512Hash returns the SHA-512 hash of the input string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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