MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / encode

Method encode

extern/md5/md5.cpp:452–462  ·  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

450// Encodes input (UINT4) into output (unsigned char). Assumes len is
451// a multiple of 4.
452void MD5::encode (uint1 *output, uint4 *input, uint4 len) {
453
454 unsigned int i, j;
455
456 for (i = 0, j = 0; j < len; i++, j += 4) {
457 output[j] = (uint1) (input[i] & 0xff);
458 output[j+1] = (uint1) ((input[i] >> 8) & 0xff);
459 output[j+2] = (uint1) ((input[i] >> 16) & 0xff);
460 output[j+3] = (uint1) ((input[i] >> 24) & 0xff);
461 }
462}
463
464
465

Callers 1

get_and_replaceFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected