utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, salt, hash string) bool

func GenerateRandomString

func GenerateRandomString(n int) string

GenerateRandomString can be used to create verification codes this implementation comes from stackoverflow https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-go

func HashPassword

func HashPassword(password, salt string) (string, error)

func ShiftPath

func ShiftPath(p string) (head, tail string)

ShiftPath splits path on the next / e.g. "api/user/password" => "api", "user/password"

Types

This section is empty.

Jump to

Keyboard shortcuts

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