Documentation ¶
Overview ¶
Package hasher provides common functions for working with passwords.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
CheckPasswordHash compares a plaintext password with it's possible bcrypt hash equivalent.
Example ¶
fmt.Println(CheckPasswordHash("super-secret-password", "$2a$04$09IzQ3oawFacAKHjG7QFneYFIaxV2fCNy7RG63RlFKQd.1ChHU6Xa")) fmt.Println(CheckPasswordHash("super-secret-password", "not-a-hash"))
Output: true false
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.