Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide public type representing parsed hash #43

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

evdokimovs
Copy link

Synopsis

In some cases library user may want to parse hash (for validation purposes e.g.) and use it in the future for validating passwords.

Solution

rust-argon2 crate already has Decoded structure which represents parsed hash and decode_string function which parses hash.

I propose to make Decoded structure public, move decode_string function implementation to the FromStr trait and add functions which can verify passwords by Decoded structure.

Also, I propose to rename Decoded structure to the Digest, because for external user Decoded name doesn't make sense. But Digest name also can be confusing. Maybe there is a better name for it?

@mrijkeboer
Copy link
Member

Hi @evdokimovs,

Thanks for creating this pull request. I'm not necessarily against providing a public accessible representation of the parsed hash, however, Digest is not the right name for this in my opinion.

@tyranron
Copy link

@evdokimovs @mrijkeboer I'd voe for a Decoded name. It's quite straightforward and understandable for me as an external user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants