55 #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
56 #define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y))))
57 #define H(x, y, z) ((x) ^ (y) ^ (z))
58 #define I(x, y, z) ((y) ^ ((x) | ~(z)))
61 #define STEP(f, a, b, c, d, x, t, s) \
62 (a) += f((b), (c), (d)) + (x) + (t); \
63 (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
69 (InternalState.block[(n)] = (MD5_u32plus)ptr[(n)*4] | \
70 ((MD5_u32plus)ptr[(n)*4 + 1] << 8) | \
71 ((MD5_u32plus)ptr[(n)*4 + 2] << 16) | \
72 ((MD5_u32plus)ptr[(n)*4 + 3] << 24))
73 #define GET(n) (InternalState.block[(n)])
81 MD5_u32plus
a,
b,
c,
d;
82 MD5_u32plus saved_a, saved_b, saved_c, saved_d;
83 unsigned long Size =
Data.size();
176 }
while (Size -= 64);
191 unsigned long used, free;
192 const uint8_t *
Ptr =
Data.data();
193 unsigned long Size =
Data.size();
195 saved_lo = InternalState.lo;
196 if ((InternalState.lo = (saved_lo + Size) & 0x1fffffff) < saved_lo)
198 InternalState.hi += Size >> 29;
200 used = saved_lo & 0x3f;
213 body(
ArrayRef(InternalState.buffer, 64));
235 unsigned long used, free;
237 used = InternalState.lo & 0x3f;
239 InternalState.buffer[
used++] = 0x80;
244 memset(&InternalState.buffer[
used], 0, free);
245 body(
ArrayRef(InternalState.buffer, 64));
250 memset(&InternalState.buffer[
used], 0, free - 8);
252 InternalState.lo <<= 3;
256 body(
ArrayRef(InternalState.buffer, 64));
271 auto StateToRestore = InternalState;
276 InternalState = StateToRestore;
283 toHex(*
this,
true, Str);
288 toHex(Result,
true, Str);