Skip to content

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