MCPcopy Create free account
hub / github.com/acl-dev/acl / byteSwap

Function byteSwap

lib_acl_cpp/samples/md5/md5_c.cpp:12–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11#ifdef WORDS_BIGENDIAN
12void byteSwap(uint32_t * buf, unsigned words)
13{
14 uint8_t *p = (uint8_t *) buf;
15
16 do {
17 *buf++ = (uint32_t) ((unsigned) p[3] << 8 | p[2]) << 16 |
18 ((unsigned) p[1] << 8 | p[0]);
19 p += 4;
20 } while (--words);
21}
22#else
23#define byteSwap(buf,words)
24#endif

Callers 2

md5_updateFunction · 0.70
md5_finalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…