Botan

Byte Swapping Operations

License
Botan is released under the Simplified BSD License (see LICENSE.md)

ushort  reverseBytes(ushort val);

Swap a 16 bit integer


uint  reverseBytes(uint val);

Swap a 32 bit integer


ulong  reverseBytes(ulong val);

Swap a 64 bit integer


void  bswap4(T)(ref T[4] x);

Swap 4 Ts in an array


void  bswap4(ref uint[4] x);

Swap 4 uints in an array using SSE2 shuffle instructions