Documentation ¶
Overview ¶
Package scrypto provides simple functions to hash passwords with scrypt and compare plaintext ones for validity.
Index ¶
Constants ¶
View Source
const ( // SaltLen is the default length of the random salt. SaltLen = 32 // DefaultN is the default value for Scrypt N. DefaultN = 16384 // DefaultR is the default value for Scrypt r. DefaultR = 8 // DefaultP is the default value for Scrypt p. DefaultP = 1 // KeyLen is the length for the generated key. KeyLen = 32 )
View Source
const Version = "0.1.0"
Version is the version of this package.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
Compare compares a plaintext password to a hashed password. password is a plaintext password. hpass is hashed password string in $s0$ format. returns true if passwords match, false otherwise.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.