auth

package
v0.0.0-...-2c3d085 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hashedPassword []byte) bool

CheckPasswordHash compares the hashed password with the plain password

func CreateJWT

func CreateJWT(userID, secret string) (string, error)

func GenerateRandomString

func GenerateRandomString(length int) string

GenerateRandomString generates a random string of the given length

func HashPassword

func HashPassword(password []byte) ([]byte, error)

HashPassword hashes the password using bcrypt with a generated salt

Types

This section is empty.

Jump to

Keyboard shortcuts

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