Make SHA1 computation thread-safe.

Previously SHA1Transform() kept a static buffer. As result SHA1 was not
always computed correctly when running that code in parallel on multiple
threads. That was causing spurious messages about invalid Message
Integrity attribute when running some tests in chromoting.

R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/57379004

Cr-Commit-Position: refs/heads/master@{#9238}
diff --git a/webrtc/base/sha1.cc b/webrtc/base/sha1.cc
index 6853054..0e47597 100644
--- a/webrtc/base/sha1.cc
+++ b/webrtc/base/sha1.cc
@@ -91,6 +91,11 @@
  *   84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
  * A million repetitions of "a"
  *   34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
+ *
+ * -----------------
+ * Modified 05/2015
+ * By Sergey Ulanov <sergeyu@chromium.org>
+ * Removed static buffer to make computation thread-safe.
  */
 
 // Enabling SHA1HANDSOFF preserves the caller's data buffer.
@@ -157,7 +162,7 @@
     uint32 l[16];
   };
 #ifdef SHA1HANDSOFF
-  static uint8 workspace[64];
+  uint8 workspace[64];
   memcpy(workspace, buffer, 64);
   CHAR64LONG16* block = reinterpret_cast<CHAR64LONG16*>(workspace);
 #else