Changeset 160228 in webkit
- Timestamp:
- Dec 6, 2013 10:54:00 AM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r160221 r160228 1 2013-12-06 Laszlo Vidacs <lac@inf.u-szeged.hu> 2 3 Define SHA1 hash size in SHA1.h and use it at various places. 4 https://bugs.webkit.org/show_bug.cgi?id=125345 5 6 Reviewed by Darin Adler. 7 8 Use SHA1::hashSize instead of local variables. 9 10 * bytecode/CodeBlockHash.cpp: 11 (JSC::CodeBlockHash::CodeBlockHash): use SHA1::hashSize 12 1 13 2013-12-05 Michael Saboff <msaboff@apple.com> 2 14 -
trunk/Source/JavaScriptCore/bytecode/CodeBlockHash.cpp
r153296 r160228 43 43 SHA1 sha1; 44 44 sha1.addBytes(sourceCode.toUTF8()); 45 Vector<uint8_t, 20> digest;45 Vector<uint8_t, SHA1::hashSize> digest; 46 46 sha1.computeHash(digest); 47 47 m_hash += digest[0] | (digest[1] << 8) | (digest[2] << 16) | (digest[3] << 24); -
trunk/Source/WTF/ChangeLog
r160210 r160228 1 2013-12-06 Laszlo Vidacs <lac@inf.u-szeged.hu> 2 3 Define SHA1 hash size in SHA1.h and use it at various places. 4 https://bugs.webkit.org/show_bug.cgi?id=125345 5 6 Reviewed by Darin Adler. 7 8 Use SHA1::hashSize instead of local variables. 9 10 * wtf/SHA1.h: define SHA1 hash size 11 1 12 2013-12-05 Iain Lane <iain.lane@canonical.com> 2 13 -
trunk/Source/WTF/wtf/SHA1.h
r136199 r160228 65 65 // Compute the hex digest directly. Pass a limit less than 40 if you want a shorter digest. 66 66 WTF_EXPORT_PRIVATE CString computeHexDigest(); 67 67 68 // Size of the SHA1 hash 69 WTF_EXPORT_PRIVATE static const size_t hashSize = 20; 70 68 71 private: 69 72 void finalize(); -
trunk/Source/WebCore/ChangeLog
r160227 r160228 1 2013-12-06 Laszlo Vidacs <lac@inf.u-szeged.hu> 2 3 Define SHA1 hash size in SHA1.h and use it at various places. 4 https://bugs.webkit.org/show_bug.cgi?id=125345 5 6 Reviewed by Darin Adler. 7 8 Use SHA1::hashSize instead of local variables. 9 10 * Modules/websockets/WebSocketHandshake.cpp: 11 (WebCore::WebSocketHandshake::getExpectedWebSocketAccept): 12 * platform/network/soup/ResourceHandleSoup.cpp: 13 (WebCore::HostTLSCertificateSet::computeCertificateHash): 14 1 15 2013-12-06 Dan Bernstein <mitz@apple.com> 2 16 -
trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
r159390 r160228 110 110 { 111 111 static const char* const webSocketKeyGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; 112 static const size_t sha1HashSize = 20; // FIXME: This should be defined in SHA1.h.113 112 SHA1 sha1; 114 113 CString keyData = secWebSocketKey.ascii(); 115 114 sha1.addBytes(reinterpret_cast<const uint8_t*>(keyData.data()), keyData.length()); 116 115 sha1.addBytes(reinterpret_cast<const uint8_t*>(webSocketKeyGUID), strlen(webSocketKeyGUID)); 117 Vector<uint8_t, sha1HashSize> hash;116 Vector<uint8_t, SHA1::hashSize> hash; 118 117 sha1.computeHash(hash); 119 return base64Encode(hash.data(), sha1HashSize);118 return base64Encode(hash.data(), SHA1::hashSize); 120 119 } 121 120 -
trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r157624 r160228 206 206 return String(); 207 207 208 static const size_t sha1HashSize = 20;209 208 SHA1 sha1; 210 209 sha1.addBytes(certificateData->data, certificateData->len); 211 210 212 Vector<uint8_t, sha1HashSize> digest;211 Vector<uint8_t, SHA1::hashSize> digest; 213 212 sha1.computeHash(digest); 214 213 215 return base64Encode(reinterpret_cast<const char*>(digest.data()), sha1HashSize);214 return base64Encode(reinterpret_cast<const char*>(digest.data()), SHA1::hashSize); 216 215 } 217 216
Note: See TracChangeset
for help on using the changeset viewer.