MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / Encode

Function Encode

md5.c:288–298  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

286 a multiple of 4.
287 */
288static void Encode (unsigned char *output, UINT4 *input, unsigned int len)
289{
290 unsigned int i, j;
291
292 for (i = 0, j = 0; j < len; i++, j += 4) {
293 output[j] = (unsigned char)(input[i] & 0xff);
294 output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
295 output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
296 output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
297 }
298}
299
300/* Decodes input (unsigned char) into output (UINT4). Assumes len is
301 a multiple of 4.

Callers 1

MD5FinalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected