alexedwards / argon2id

Argon2id password hashing and verification for Go
MIT License
467 stars 45 forks source link

Feature request: Derived key from hash (IDKey) #12

Closed alfonmga closed 2 years ago

alfonmga commented 3 years ago

It would be helpful to add a method to derive keys from hashes.

Proposed method spec:

func IDKeyFromHash(hash string, keyLen uint32) []byte

https://pkg.go.dev/golang.org/x/crypto/argon2#IDKey

alfonmga commented 3 years ago

I didn't saw DecodeHash method before creating this issue. Be free to close this issue if you think maybe it's out of scope for this package.

Thanks for your work BTW ;-)

alexedwards commented 2 years ago

Sorry for the slow reply. Like you say, I think it's easy enough to achieve this by using DecodeHash so I'll close the issue.