DecodeHash goes straight to decoding argon2id params without checking first if vals[1] == "argon2id". I think this check is required and a meaningful error must be returned if wrong hash type is provided.
Good spot, thanks. I've pushed commit b3bf4bb8cbbf75de9aa4cc45382e7356611204af which now returns an ErrIncompatibleVariant error if the hash uses a variant that isn't equal to argon2id
DecodeHash goes straight to decoding argon2id params without checking first if
vals[1] == "argon2id"
. I think this check is required and a meaningful error must be returned if wrong hash type is provided.