Skip to content
This repository was 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
apoelstra merged 1 commit intomasterfrom
2019-05-hmac-engine
May 2, 2019
Merged

hmac: make Midstate type be something we can actually construct an engine from#43
apoelstra merged 1 commit intomasterfrom
2019-05-hmac-engine

Conversation

@apoelstra
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 force-pushed the 2019-05-hmac-engine branch from 63201d0 to f14f4b1 Compare May 2, 2019 14:45
@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