bcrypt

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinCost     int = bcrypt.MinCost
	MaxCost     int = bcrypt.MaxCost
	DefaultCost int = bcrypt.DefaultCost
)

Variables

This section is empty.

Functions

func Compare

func Compare(h, s string) error

Compare function compares a bcrypt hashed string with its possible plaintext equivalent. Returns nil on success, or an error on failure.

func Hash

func Hash(s string, cost int) (string, error)

Hash function returns hashed string by BCrypt algorithm.

Types

This section is empty.

Jump to

Keyboard shortcuts

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