-
Notifications
You must be signed in to change notification settings - Fork 236
hash2curve Expander
improvements
#1318
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
base: master
Are you sure you want to change the base?
Conversation
I find the
As also written, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like having this sort of API over complicates things here.
But it is a reader API. This PR is choosing to expose it as-is instead of wrapping it into a less complicated one.
This isn't actually a copy of |
I believe that invoking the ghost of the So why am I proposing this API? Couldn't we just have left the API as-is? In conclusion, I feel like the improvements here have a very clear purpose and direction to me. I'm not seeing the issue nor the downside here exactly. However, while this change doesn't make the API more complicated to use compared to the current one (we are just exposing more information the user can happily ignore), it is significantly more complicated than #1317. |
0461fe7
to
ace4a37
Compare
This PR does three changes:
Expander
s outputting more thanlen_in_bytes
.Expander::fill_bytes()
return aResult<usize>
, to more closely mimic a rustyRead
er.ExpandMsgXmd
to copy whole slices instead of copying byte by byte.This is an alternative take to addressing the issues #1317 found.
However, this PR doesn't get rid of any traits or types. I originally intended to get rid of
ExpanderXmd
, but I remembered again why we kept it in the first place: to remove the lifetime fromExpandMsg
.