src/algo/md5.cpp
void byteReverse(unsigned char *buf, unsigned longs)
{
    uint32 t;
    do {
	t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
	    ((unsigned) buf[1] << 8 | buf[0]);
	*(uint32 *) buf = t;
	buf += 4;
    } while (--longs);
}
/*
 * Note: this code is harmless on little-endian machines.
 */
this code is harmless on little-endian machines.
this code is harmless on little - endian machines .
void byteReverse(unsigned char *buf, unsigned longs)
{
    uint32 t;
    do {
	t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
	    ((unsigned) buf[1] << 8 | buf[0]);
	*(uint32 *) buf = t;
	buf += 4;
    } while (--longs);
}
void byteReverse ( unsigned char * buf , unsigned longs ) { uint32 t ; do { t = ( uint32 ) ( ( unsigned ) buf [ 3 ] << 8 | buf [ 2 ] ) << 16 | ( ( unsigned ) buf [ 1 ] << 8 | buf [ 0 ] ) ; * ( uint32 * ) buf = t ; buf += 4 ; } while ( -- longs ) ; }
Note: this code is harmless on little-endian machines.
Note : this code is harmless on little - endian machines .