security

package
v0.0.0-...-a61272a Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashSecret

func HashSecret(secret string) (string, error)

func ParseJWT

func ParseJWT(key, token string) (jwt.MapClaims, error)

func RandomString

func RandomString(length int) string

Generates a random string using crypt/rand package

func SignJWT

func SignJWT(key string, claims jwt.MapClaims, ttl time.Duration) (string, int64, error)

func VerifyHash

func VerifyHash(hash, secret string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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