-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add sha256 function #117
Add sha256 function #117
Conversation
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.
This looks great! Thanks @Acaccia. Just one comment and also a request to add property tests as well.
@obycode any possibility to ask someone else to write the property tests here? I'm very focused on the implementation of There are a few complications to consider in this case:
Also, I would say that in this case, the testing of multiple input is not that important. A tiny drift in |
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.
Following up from the meeting, I'm okay with getting this merged and saving the additional testing for later, with @csgui taking a look after his current work.
…esults on the stack
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.
lgtmn!
This PR adds
sha256
function that works on buffers and (u)int.This is entirely written in Webassembly. I even used some SIMD whenever I could. I'm proud.
This is part of #69.
sha256
is needed in order to writehash160
.