24 lines
465 B
Go
24 lines
465 B
Go
package argon2_utils
|
|
|
|
import "errors"
|
|
|
|
type params struct {
|
|
memory uint32
|
|
iterations uint32
|
|
parallelism uint8
|
|
saltLength uint32
|
|
keyLength uint32
|
|
}
|
|
|
|
var (
|
|
ErrInvalidHash = errors.New("the encoded hash is not in the correct format")
|
|
ErrIncompatibleVersion = errors.New("incompatible version of argon2")
|
|
p = ¶ms{
|
|
memory: 64 * 1024,
|
|
iterations: 3,
|
|
parallelism: 2,
|
|
saltLength: 16,
|
|
keyLength: 32,
|
|
}
|
|
)
|