MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / byteReverse

Function byteReverse

src/core/sha.cpp:243–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241 at compile time */
242
243static void byteReverse(uint32* buffer, int byteCount)
244 {
245 uint32 value;
246 int count;
247
248 byteCount /= sizeof( uint32 );
249 for( count = 0; count < byteCount; count++ )
250 {
251 value = ( buffer[ count ] << 16 ) | ( buffer[ count ] >> 16 );
252 buffer[ count ] = ( ( value & 0xFF00FF00L ) >> 8 ) | ( ( value & 0x00FF00FFL ) << 8 );
253 }
254 }
255#endif /* #ifndef WORDS_BIGENDIAN */
256
257/* Update SHS for a block of data. This code assumes that the buffer size

Callers 2

shsUpdateFunction · 0.70
shsFinalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected