[Webkit-unassigned] [Bug 143826] Use CommonCrypto for SHA1 and MD5

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 17 10:54:42 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=143826

--- Comment #5 from Antti Koivisto <koivisto at iki.fi> ---
> All I see is the comment change and the new CommonCrypto. I don’t see a code
> change that makes that change for the non-CommonCrypto version. Is the idea
> that now computeHash might reset the state and might not? I think this is
> slightly untidy right now. I don’t know what the rules are about what you
> can and can’t do after calling computeHash and what behavior you should
> expect.

It seemed unnecessary to actually change the behavior of the existing implemention. It just calls reset() which sets the state back to initial state. This is not expensive and some sort of state cleanup is needed to not have computation left in memory. On the other hand I didn't want to introduce extra CC_SHA1_Init call to match this unused behavior. CC_SHA1_Final cleans up the state just fine.

The new behavior is that you create new SHA1 instance for each computation. This is how the clients seem to expect it to behave anyway and matches similar MD5 type.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150417/3c399dad/attachment.html>


More information about the webkit-unassigned mailing list