-
Notifications
You must be signed in to change notification settings - Fork 117
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
how to get the preimage size for implementing sha256 #320
Comments
Is there anything wrong with using |
|
I also need to add a parameter |
You could do that, yeah! But I still don't get what's wrong with always using 255 as the length. EDIT: Is it a problem for sha256 if some significant bits of that 255 bits are zero? (this would surprise me, to be honest..) |
no! the code inside a circuit is normal JavaScript. Normal JS doesn't crash when you use slice on an array, except when that array is undefined or something like that. |
Closing this issue, let's continue debugging in discord |
hello , I am implementing sha256.
before that i should know the preimage size to do the padding.
but when calling
toBits().length
, it returns255
all the tme.so any idea to get the preimage size?
The text was updated successfully, but these errors were encountered: