MCPcopy Create free account
hub / github.com/SNAS/openbmp / encode

Method encode

Server/src/md5.cpp:428–438  ·  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

426// Encodes input (UINT4) into output (unsigned char). Assumes len is
427// a multiple of 4.
428void MD5::encode (uint1 *output, uint4 *input, uint4 len) {
429
430 unsigned int i, j;
431
432 for (i = 0, j = 0; j < len; i++, j += 4) {
433 output[j] = (uint1) (input[i] & 0xff);
434 output[j+1] = (uint1) ((input[i] >> 8) & 0xff);
435 output[j+2] = (uint1) ((input[i] >> 16) & 0xff);
436 output[j+3] = (uint1) ((input[i] >> 24) & 0xff);
437 }
438}
439
440
441

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected