dcrypt.bitmanip

Undocumented in source.

Members

Aliases

rol
alias rol = rotateLeft

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

ror
alias ror = rotateRight
Undocumented in source.

Functions

fromBigEndian
T fromBigEndian(ubyte[] bs)

Converts big endian bytes to integral of type T

fromBigEndian
void fromBigEndian(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(ubyte[] bs)

Converts little endian bytes to integral of type T

fromLittleEndian
void fromLittleEndian(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(T val, ubyte[] output)

convert a integral type T into an array of bytes.

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

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

toBigEndian
ubyte[T.sizeof] toBigEndian(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
toBigEndian
ubyte[] toBigEndian(T[] ns)
Undocumented in source. Be warned that the author may not have intended to support it.
toLittleEndian
void toLittleEndian(T val, ubyte[] output)

convert a integral type T into an array of bytes.

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

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

toLittleEndian
ubyte[T.sizeof] toLittleEndian(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
toLittleEndian
ubyte[] toLittleEndian(T[] ns)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta