Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultHashParams = HashParams{
HashFunction: "argon2",
Memory: 32 * 1024,
Time: 3,
Threads: 4,
SaltLength: 32,
KeyLength: 32,
}
)
Functions ¶
func VerifyPassword ¶
func VerifyPassword(givenPassword string, comparator *HashResults) (bool, error)
Types ¶
type HashParams ¶
type HashResults ¶
type HashResults struct { Salt string `json:"salt"` Hash string `json:"hash"` Params HashParams `json:"params"` }
func HashPassword ¶
func HashPassword(password string, p *HashParams) (*HashResults, error)
Click to show internal directories.
Click to hide internal directories.