<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Use CommonCrypto for SHA1 and MD5"
   href="https://bugs.webkit.org/show_bug.cgi?id=143826#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Use CommonCrypto for SHA1 and MD5"
   href="https://bugs.webkit.org/show_bug.cgi?id=143826">bug 143826</a>
              from <span class="vcard"><a class="email" href="mailto:koivisto&#64;iki.fi" title="Antti Koivisto &lt;koivisto&#64;iki.fi&gt;"> <span class="fn">Antti Koivisto</span></a>
</span></b>
        <pre><span class="quote">&gt; All I see is the comment change and the new CommonCrypto. I don’t see a code
&gt; change that makes that change for the non-CommonCrypto version. Is the idea
&gt; that now computeHash might reset the state and might not? I think this is
&gt; slightly untidy right now. I don’t know what the rules are about what you
&gt; can and can’t do after calling computeHash and what behavior you should
&gt; expect.</span >

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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>