-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
#890: Add ECDSA.toEthSignedMessageHash(bytes) for abritrary length message hashing #2865
Conversation
Hello @td-bn , and thank you for this PR! Do you think it would be possible to add a test with a message that is not 32 bytes long? |
@Amxx, I've added said test. Please take a look. |
Please add a test in the section that says Also, the function name of the new function should be |
Thanks @td-bn! I made two small changes in the tests. Note that I replaced the longer string with a short one, because it's easier to tell that it doesn't happen to have length 32. |
Fixes #890
Issue link
The PR adds a function toEthSignedMessageHash(bytes) to the ECDSA contract, that works for any length of a bytes array.
PR Checklist