source/Lib/CommonLib/MD5.h
void byteReverse(uint32_t *buf, unsigned len)
{
  uint32_t t;
  do {
    char* bytes = (char *) buf;
    t = ((unsigned) bytes[3] << 8 | bytes[2]) << 16 |
        ((unsigned) bytes[1] << 8 | bytes[0]);
    *buf = t;
    buf++;
  } while (--len);
}
/*
 * 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(uint32_t *buf, unsigned len)
{
  uint32_t t;
  do {
    char* bytes = (char *) buf;
    t = ((unsigned) bytes[3] << 8 | bytes[2]) << 16 |
        ((unsigned) bytes[1] << 8 | bytes[0]);
    *buf = t;
    buf++;
  } while (--len);
}
void byteReverse ( uint32_t * buf , unsigned len ) { uint32_t t ; do { char * bytes = ( char * ) buf ; t = ( ( unsigned ) bytes [ 3 ] << 8 | bytes [ 2 ] ) << 16 | ( ( unsigned ) bytes [ 1 ] << 8 | bytes [ 0 ] ) ; * buf = t ; buf ++ ; } while ( -- len ) ; }
Note: this code is harmless on little-endian machines.
Note : this code is harmless on little - endian machines .