security

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT(user *entities.User, secretKey string, ttl time.Duration, algorithm string) (string, error)

func HashPassword

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

func ParseJWT

func ParseJWT(tokenString, secretKey string) (int, error)

func ValidateHashedPassword

func ValidateHashedPassword(password, hashedPassword string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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