alexedwards / argon2id

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

support for pepper? #9

Closed G2G2G2G closed 3 years ago

G2G2G2G commented 3 years ago

Right now I append a pepper onto all passwords (especially useful for people using terrible passes)

Was wondering if this can be added to the params?

ethanmad commented 3 years ago

@G2G2G2G In case you didn't know, argon2id supports peppers. Just concatenate password and pepper.

You can compare password and hash like so: match, err := argon2id.ComparePasswordAndHash(plaintext+pepper, hasedPassword);

Hash a password like so: hashedPw, err := argon2id.CreateHash(plaintext+pepper, argon2id.DefaultParams);

G2G2G2G commented 3 years ago

Yes I understand that, I said "I append a pepper onto all passwords" which is the same as concatenate.

was just curious if it was going to be added, but I guess it doesn't matter if he's kinda inactive on it