Module convert

Module convert 

Source
Expand description

Helper functions for converting between byte, word and hex string representations.

Enums§

FromHexError
The error type for decoding a hex string into Vec<u8> or [u8; N].

Functions§

bool_from_word
Convert a Word to its bool representation.
bytes_from_word
Convert a Word to its bytes.
hex_str_from_words
Convert a slice of Words to a hex string.
u8_32_from_word_4
A common conversion for 32-byte hashes and other addresses.
u8_64_from_word_8
A common conversion for 64-byte signatures.
word_4_from_u8_32
A common conversion for 32-byte hashes and other addresses.
word_8_from_u8_64
A common conversion for 64-byte signatures.
word_from_bytes
Convert a fixed array of bytes to a Word.
word_from_bytes_slice
Convert a slice of bytes to a Word.
words_from_hex_str
Convert a hex string slice to a Vec<Word>.