ObjFW  Diff

Differences From Artifact [f6e92bc9b9]:

To Artifact [969e062cb6]:


186
187
188
189
190
191
192
193

194
195
196
197
198
199
200
186
187
188
189
190
191
192

193
194
195
196
197
198
199
200







-
+








		if (length < t) {
			memcpy(p, buffer, length);
			return;
		}

		memcpy(p, buffer, t);
		BSWAP32_VEC_IF_BE(in.u32, 16);
		BSWAP32_VEC_IF_BE(_in.u32, 16);
		md5_transform(_buffer, _in.u32);

		buffer += t;
		length -= t;
	}

	/* Process data in 64-byte chunks */
241
242
243
244
245
246
247
248

249
250
251
252
253
254
255
256
257
258
259
260
261
241
242
243
244
245
246
247

248
249
250
251
252
253
254
255
256
257
258
259
260
261







-
+














		/* Now fill the next block with 56 bytes */
		memset(_in.u8, 0, 56);
	} else {
		/* Pad block to 56 bytes */
		memset(p, 0, count - 8);
	}
	BSWAP32_VEC_IF_BE(in.u32, 14);
	BSWAP32_VEC_IF_BE(_in.u32, 14);

	/* Append length in bits and transform */
	_in.u32[14] = _bits[0];
	_in.u32[15] = _bits[1];

	md5_transform(_buffer, _in.u32);
	BSWAP32_VEC_IF_BE(_buffer, 4);

	_calculated = YES;

	return (uint8_t*)_buffer;
}
@end