MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / body

Function body

dds/DCPS/Hash.cpp:115–220  ·  view source on GitHub ↗

* This processes one or more 64-byte data blocks, but does NOT update * the bit counters. There are no alignment requirements. */

Source from the content-addressed store, hash-verified

113 * the bit counters. There are no alignment requirements.
114 */
115static const void *body(MD5_CTX *ctx, const void *data, unsigned long size)
116{
117 const unsigned char *ptr;
118 MD5_u32plus a, b, c, d;
119 MD5_u32plus saved_a, saved_b, saved_c, saved_d;
120
121 ptr = (const unsigned char *) data;
122
123 a = ctx->a;
124 b = ctx->b;
125 c = ctx->c;
126 d = ctx->d;
127
128 do {
129 saved_a = a;
130 saved_b = b;
131 saved_c = c;
132 saved_d = d;
133
134/* Round 1 */
135 STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
136 STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)
137 STEP(F, c, d, a, b, SET(2), 0x242070db, 17)
138 STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)
139 STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)
140 STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)
141 STEP(F, c, d, a, b, SET(6), 0xa8304613, 17)
142 STEP(F, b, c, d, a, SET(7), 0xfd469501, 22)
143 STEP(F, a, b, c, d, SET(8), 0x698098d8, 7)
144 STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)
145 STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)
146 STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)
147 STEP(F, a, b, c, d, SET(12), 0x6b901122, 7)
148 STEP(F, d, a, b, c, SET(13), 0xfd987193, 12)
149 STEP(F, c, d, a, b, SET(14), 0xa679438e, 17)
150 STEP(F, b, c, d, a, SET(15), 0x49b40821, 22)
151
152/* Round 2 */
153 STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)
154 STEP(G, d, a, b, c, GET(6), 0xc040b340, 9)
155 STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)
156 STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)
157 STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)
158 STEP(G, d, a, b, c, GET(10), 0x02441453, 9)
159 STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)
160 STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)
161 STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)
162 STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)
163 STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)
164 STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)
165 STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)
166 STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)
167 STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)
168 STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)
169
170/* Round 3 */
171 STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)
172 STEP(H, d, a, b, c, GET(8), 0x8771f681, 11)

Callers 2

MD5_UpdateFunction · 0.85
MD5_FinalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected