-
Notifications
You must be signed in to change notification settings - Fork 84
wip: "imprint" fn #541
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
wip: "imprint" fn #541
Conversation
Implmenting fingerprints in terms of imprint is good for test coverage, so we can be sure imprints always contain the same data as fingerprints. I don't think a |
I've pushed a commit to see how |
It's a bit sad how much But it seems that neither the rustcrypto types nor the current rpgp hashing mechanism have suitable facilities for this. We could make them for this PR? |
Is it going to use |
I didn't have a concrete idea, but making this nicer on the type-level would seem potentially worthwhile. Hoping for @dignifiedquire to weigh in with thoughts/preferences :) |
I'm also fine with .expect(), it's not really going to crash the app. Especially if alternative with generic types and boxes and so on is much uglier. |
Closing in favor of #549 |
This is just a sketch for discussion.
We could consider having an "imprint" function roughly like this, and implementing "fingerprint" in terms of it.
I think the cost of that would mainly be that the Hasher is Boxed in this more generic approach?