Documentation
¶
Index ¶
- Variables
- func CheckUint(i int) error
- func ConstantTimeCompareStr(a, b string) bool
- func ExtractBearerToken(r *http.Request) (string, error)
- func GenerateRandomBytes(length uint32) ([]byte, error)
- func GenerateRandomBytesStdEncoded(length uint32) (string, error)
- func GenerateRandomBytesURLEncoded(length uint32) (string, error)
- func SHA256Hash(plain, key string) ([]byte, error)
- type Argon2Hasher
- type RandomizeFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var STDRandomizer = RandomizeFunc(func(length uint32) (string, error) { b, err := GenerateRandomBytes(length) if err != nil { return "", err } return hex.EncodeToString(b), nil })
Functions ¶
func ConstantTimeCompareStr ¶
Constant time comparison
func GenerateRandomBytes ¶
func SHA256Hash ¶
Types ¶
type Argon2Hasher ¶
type Argon2Hasher struct {
// contains filtered or unexported fields
}
func NewArgon2Hasher ¶
func NewArgon2Hasher(cfg *config.Argon2, pepper string) *Argon2Hasher
Click to show internal directories.
Click to hide internal directories.