21 #define ALLOW_UNALIGNED_READS 1
42 u.p8 = (
const uint8 *)message;
46 memcpy(buf, message, length);
50 size_t remainder = length%32;
58 const uint64 *end = u.p64 + (length/32)*4;
61 for (; u.p64 < end; u.p64 += 4)
82 d = ((
uint64)length) << 56;
87 d += ((
uint64)u.p8[14]) << 48;
90 d += ((
uint64)u.p8[13]) << 40;
93 d += ((
uint64)u.p8[12]) << 32;
101 d += ((
uint64)u.p8[10]) << 16;
104 d += ((
uint64)u.p8[9]) << 8;
114 c += ((
uint64)u.p8[6]) << 48;
117 c += ((
uint64)u.p8[5]) << 40;
120 c += ((
uint64)u.p8[4]) << 32;
127 c += ((
uint64)u.p8[2]) << 16;
130 c += ((
uint64)u.p8[1]) << 8;
158 Short(message, length, hash1, hash2);
162 uint64 h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11;
173 h0=h3=h6=h9 = *hash1;
174 h1=h4=h7=h10 = *hash2;
177 u.p8 = (
const uint8 *)message;
185 Mix(u.p64, h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);
194 Mix(buf, h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);
200 remainder = (length - ((
const uint8 *)end-(
const uint8 *)message));
201 memcpy(buf, end, remainder);
204 Mix(buf, h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);
207 End(h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);
227 uint64 h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11;
241 memcpy(&((
uint8 *)
m_data)[m_remainder], message, length);
243 m_remainder = (
uint8)newLength;
276 memcpy(&(((
uint8 *)
m_data)[m_remainder]), message, prefix);
278 Mix(u.p64, h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);
279 Mix(&u.p64[
sc_numVars], h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);
280 u.p8 = ((
const uint8 *)message) + prefix;
285 u.p8 = (
const uint8 *)message;
290 remainder = (
uint8)(length-((
const uint8 *)end-u.p8));
296 Mix(u.p64, h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);
305 Mix(
m_data, h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);
311 m_remainder = remainder;
312 memcpy(
m_data, end, remainder);
359 Mix(data, h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);
368 Mix(data, h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);
371 End(h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11);