alexedwards / argon2id

Argon2id password hashing and verification for Go
MIT License
452 stars 44 forks source link

Update documentation in Changing the Parameter #5

Closed AmazingPapaya4 closed 4 years ago

AmazingPapaya4 commented 4 years ago

Hi, this is regarding the documentation in Changing the Parameter. Currently it is,

params := &Params{
    Memory:      128 * 1024,
    Iterations:  4,
    Parallelism: 4,
    SaltLength:  16,
    KeyLength:   32,
}
hash, err := argon2id.CreateHash("pa$$word", argon2id.DefaultParams)

Shouldn't it be?

params := &argon2id.Params{
    Memory:      128 * 1024,
    Iterations:  4,
    Parallelism: 4,
    SaltLength:  16,
    KeyLength:   32,
}
hash, err := argon2id.CreateHash("pa$$word", params)
alexedwards commented 4 years ago

Yes! Thank you. I've fixed it.