dcrypt.bitmanip

Members

Aliases

rol
alias rol = rotateLeft

This module contains several methods to convert integer types into byte arrays and vice versa.

Functions

fromBigEndian
T fromBigEndian(in ubyte[] bs)

Converts big endian bytes to integral of type T

fromBigEndian
void fromBigEndian(in ubyte[] bs, T[] output)

Converts big endian bytes to integrals of type T size of bs has to match the size in bytes of output

fromLittleEndian
T fromLittleEndian(in ubyte[] bs)

Converts little endian bytes to integral of type T

fromLittleEndian
void fromLittleEndian(in ubyte[] bs, T[] output)

Converts little endian bytes to integrals of type T size of bs has to match the size in bytes of output

rotateLeft
T rotateLeft(T x, uint shiftAmount)

rot shift to the left

rotateRight
T rotateRight(T x, uint shiftAmount)

rot shift to the right

toBigEndian
void toBigEndian(in T val, ubyte[] output)

convert a integral type T into an array of bytes.

toBigEndian
void toBigEndian(in T[] ns, ubyte[] output)

convert a integral type T[] into an array of bytes.

toLittleEndian
void toLittleEndian(in T val, ubyte[] output)

convert a integral type T into an array of bytes.

toLittleEndian
void toLittleEndian(in T[] ns, ubyte[] output)

convert a integral type T[] into an array of bytes.

Meta