bcrypt
Package
Overview
The bcrypt
package provides functions for hashing passwords using bcrypt.
Configuration
var (
Cost int = bcrypt.DefaultCost // Hashing cost factor
)
Reset to Default Configuration
bcrypt.Default()
Hashing a Password
hash, err := bcrypt.Hash("mypassword")
Verifying a Password
isValid := bcrypt.Verify("mypassword", hash)