Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
crypto: better error message when calling digest twice on a hash #6042
Pull Request check-list
Please make sure to review and check all of these items:
I'm getting an error on the test-tick-processor test, seems unrelated
NOTE: these things are not required to open a PR and can be done
Affected core subsystem(s)
Please provide affected core subsystem(s) (like buffer, cluster, crypto, etc)
Description of change
calling digest twice on a hash used to give an unhelpful error about the hash not being initialized, this fixes that
changed the title
[crypto] better error message when calling digest twice on a hash
Apr 4, 2016
It would be nice to have same for Hmac.
@fanatid woops was cut off replying via email, the initialized would only ever be false if for some reason the hash wasn't initialized, which probably not be possible as it is currently set up, but we don't really loose much testing for it and we will prevent problems down the line if some other change allows it to get into a weird state.