utils

package
v0.0.0-...-c791c95 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package utils is a collection of helpful utilities for common actions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(hash, password string) error

CheckPassword compares a bcrypt hashed password with its possible plaintext equivalent. Returns nil on success, or an error on failure.

func GeneratePassword

func GeneratePassword(password string) (string, error)

GeneratePassword returns the bcrypt hash string of the given password at the configured cost.

func GenerateUUID

func GenerateUUID() string

GenerateUUID returns a random UUID string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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