Expand description
Some utility functions.
Functionsยง
- combine_
tree_ hash - Calculate
sha256(0x01 || left || right)
- hex_
to_ u8 - Convert a hex string with no whitespace or other sepreator into
&[u8]
. - largest_
power_ of_ 2_ smaller_ than - For a tree of size
n
, return the size of the left branch of the root. - sha256
- Computes the SHA256 hash of some data.
- u8_
to_ hex - Convert a
&[u8]
byte array to a lower-case, no-sepreator hex string.