Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Argon2i defines the argon2i hashing algorithm Argon2i = "argon2i" //ScryptBlake2b512 defines scrypt+blake2b-512 hashing algorithm ScryptBlake2b512 = "scrypt+blake2b-512" // Pbkdf2HmacSha512 defines pbkdf2+hmac-sha512 hashing algorithm Pbkdf2HmacSha512 = "pbkdf2+hmac-sha512" )
Variables ¶
View Source
var Strategies = map[string]func(func() []byte) Strategy{ Argon2i: func(salt func() []byte) Strategy { s, _ := newArgon2Deriver(salt()) return s }, ScryptBlake2b512: func(salt func() []byte) Strategy { s, _ := newScryptDeriver(func() hash.Hash { h, err := blake2b.New512(nil) if err != nil { panic(err.Error()) } return h }, salt()) return s }, Pbkdf2HmacSha512: func(salt func() []byte) Strategy { s, _ := newPbkdf2Deriver(sha512.New, salt(), pbkdf2Iterations, sha512.Size) return s }, }
Strategies defines available hashing strategies
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.