security

package
v0.0.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLogin

func CheckLogin(sessMgr *sessionstore.SessionManager, r *http.Request) (*sessionstore.Session, error)

CheckLogin checks if a valid sessions exists in an *http.Request

func DoesHashMatch

func DoesHashMatch(password string, hash string) bool

DoesHashMatch checks whether a given password and hash match

func GenerateToken

func GenerateToken(length int) string

GenerateToken generates a token with a given length

func HashString

func HashString(password string) (string, error)

HashString returns the bcrypt hash for a given string

Types

This section is empty.

Jump to

Keyboard shortcuts

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