Documentation
¶
Index ¶
- Variables
- func ComparePasswordAndHash(password string, id uuid.UUID, encodedHash string) (match bool, err error)
- func GenerateLoginTokenWithStep(id uuid.UUID, device string, step uint) (string, error)
- func GenerateToken(tkLength int32) string
- func GetLoginDataFromToken(c *fiber.Ctx) (id uuid.UUID, device string, step uint, parseErr error)
- func HashPassword(password string, id uuid.UUID) (encodedHash string, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHash = errors.New("the encoded hash is not in the correct format") ErrIncompatibleVersion = errors.New("incompatible version of argon2") )
Functions ¶
func ComparePasswordAndHash ¶
func ComparePasswordAndHash(password string, id uuid.UUID, encodedHash string) (match bool, err error)
Check if a password is correct with a hash
func GenerateToken ¶
func GetLoginDataFromToken ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.