Module mostinefficientsha::util [] [src]

Encoding helpers between ascii, u32 and f64 representations of 256 bit hashes.

Functions

dehex

Parses a big-endian 64 characters 0-9a-f hash representation to eight u32 numbers in system endianess.

f64bits_to_u32

Takes 256 bits where each bit is represented by a float.

hex

Hex encodes eight u32 numbers to a big-endian 64 characters lowercase 0-9a-f hash representation.

u32_to_f64bits

The inverse of f64bits_to_u32(). Creates 256 doubles that are either 1.0 or 0.0 . return_value[0] is the MSBit.