Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

hmac: make Midstate type be something we can actually construct an engine from #43

Merged
merged 1 commit into from
May 2, 2019

Conversation

apoelstra
Copy link
Member

No description provided.

src/hmac.rs Outdated
/// Pair of underlying hash midstates which represent the current state
/// of an `HmacEngine`
pub struct HmacMidState<T: Hash> {
inner: <T::Engine as HashEngine>::MidState,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make them private? If so, I would at least have into_ methods. Either into_inner and into_outer or either into_inner_outer() -> (inner, outer) or something. But I think it's easier to just have the fields public.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll just make them public

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also public midstate fields makes it easier to construct static midstate objects.

@apoelstra apoelstra merged commit 5a80597 into master May 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants