Documentation ¶
Overview ¶
Package raw provides a raw implementation of the modular-crypt-wrapped scrypt primitive.
Index ¶
Constants ¶
View Source
const ( // The current recommended N value for interactive logins. RecommendedN = 16384 // The current recommended r value for interactive logins. Recommendedr = 8 // The current recommended p value for interactive logins. Recommendedp = 1 )
Variables ¶
View Source
var ErrInvalidStub = fmt.Errorf("invalid scrypt password stub")
Functions ¶
func Parse ¶
Parse parses a scrypt modular hash or stub string. The format is as follows:
$s2$N$r$p$salt$hash // hash $s2$N$r$p$salt // stub
func ScryptSHA256 ¶
Wrapper for golang.org/x/crypto/scrypt that implements a sensible modular crypt interface.
password must be a plaintext password in UTF-8 format. salt must be a random salt value in binary form. N, r, and p are parameters for scrypt.
Returns a modular crypt hash.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.