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

Feature Request - Enable caller to derive hash with plaintext password and header data #12

Open
michaeljgray-sfdc opened this issue May 13, 2020 · 0 comments · May be fixed by #13
Open

Comments

@michaeljgray-sfdc
Copy link

Current Functionality:
The class allows the caller to specify some header information such as iteration count, block size, and thread count, but not the salt. This makes it unusable for some credential verification workflows that require the application to derive the hash from header data for comparison in another system, service, or in-database.

Proposed Additional Functionality:
I'd like to either see the salt be made an optional parameter in a constructor overload or an overload to the Encode method that can take in all of the header parameters to compute the output. The core idea is that the caller would have control over the initial inputs so they could derive the hash from the full header to perform the hash comparison out of band with the hash derivation sequence.

Proposed Alternative Solution:
It might make sense to create a more "raw" method that outputs the values in their native format in addition to the standard format that is currently being output. This format would be returned as a class that has say a couple of byte arrays for the salt and hash as well as the version number in a separate variable; essentially this would decompose the header and encoded output into an object for direct storage and consumption.

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 a pull request may close this issue.

1 participant