Changeset 64302 in webkit for trunk/JavaScriptCore/wtf/MD5.cpp
- Timestamp:
- Jul 29, 2010, 12:52:22 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/MD5.cpp
r59067 r64302 55 55 #include "text/CString.h" 56 56 #endif 57 #include <wtf/StdLibExtras.h> 57 58 58 59 namespace WTF { … … 104 105 uint32_t t = static_cast<uint32_t>(buf[3] << 8 | buf[2]) << 16 | buf[1] << 8 | buf[0]; 105 106 ASSERT_WITH_MESSAGE(!(reinterpret_cast<uintptr_t>(buf) % sizeof(t)), "alignment error of buf"); 106 *reinterpret_cast <uint32_t *>(buf) = t;107 *reinterpret_cast_ptr<uint32_t *>(buf) = t; 107 108 buf += 4; 108 109 } while (--longs); … … 239 240 memcpy(p, buf, t); 240 241 reverseBytes(m_in, 16); 241 MD5Transform(m_buf, reinterpret_cast <uint32_t*>(m_in)); // m_in is 4-byte aligned.242 MD5Transform(m_buf, reinterpret_cast_ptr<uint32_t*>(m_in)); // m_in is 4-byte aligned. 242 243 buf += t; 243 244 length -= t; … … 249 250 memcpy(m_in, buf, 64); 250 251 reverseBytes(m_in, 16); 251 MD5Transform(m_buf, reinterpret_cast <uint32_t*>(m_in)); // m_in is 4-byte aligned.252 MD5Transform(m_buf, reinterpret_cast_ptr<uint32_t*>(m_in)); // m_in is 4-byte aligned. 252 253 buf += 64; 253 254 length -= 64; … … 276 277 memset(p, 0, count); 277 278 reverseBytes(m_in, 16); 278 MD5Transform(m_buf, reinterpret_cast <uint32_t *>(m_in)); // m_in is 4-byte aligned.279 MD5Transform(m_buf, reinterpret_cast_ptr<uint32_t *>(m_in)); // m_in is 4-byte aligned. 279 280 280 281 // Now fill the next block with 56 bytes … … 288 289 // Append length in bits and transform 289 290 // m_in is 4-byte aligned. 290 (reinterpret_cast <uint32_t*>(m_in))[14] = m_bits[0];291 (reinterpret_cast <uint32_t*>(m_in))[15] = m_bits[1];292 293 MD5Transform(m_buf, reinterpret_cast <uint32_t*>(m_in));291 (reinterpret_cast_ptr<uint32_t*>(m_in))[14] = m_bits[0]; 292 (reinterpret_cast_ptr<uint32_t*>(m_in))[15] = m_bits[1]; 293 294 MD5Transform(m_buf, reinterpret_cast_ptr<uint32_t*>(m_in)); 294 295 reverseBytes(reinterpret_cast<uint8_t*>(m_buf), 4); 295 296
Note:
See TracChangeset
for help on using the changeset viewer.