MCPcopy Create free account
hub / github.com/Vector35/debugger / Encode

Function Encode

test/src/md5/md5c.c:279–292  ·  view source on GitHub ↗

Encodes input (UINT4) into output (unsigned char). Assumes len is a multiple of 4. */

(output, input, len)

Source from the content-addressed store, hash-verified

277 a multiple of 4.
278*/
279static void Encode (output, input, len)
280unsigned char *output;
281UINT4 *input;
282unsigned int len;
283{
284 unsigned int i, j;
285
286 for (i = 0, j = 0; j < len; i++, j += 4) {
287 output[j] = (unsigned char)(input[i] & 0xff);
288 output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
289 output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
290 output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
291 }
292}
293
294/* Decodes input (unsigned char) into output (UINT4). Assumes len is
295 a multiple of 4.

Callers 1

MD5FinalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected