Bytesrw_hexHexadecimal tools.
See also Bytesrw.Bytes.pp_hex.
val to_binary_string : ?length:int -> string -> (string, string) resultto_binary_string hex converts hex, made of upper or lowercase US-ASCII hexadecimal digits to a binary string. If length is specified, errors if the result is not exactly length bytes.
of_binary_string s is the bytes of s in lowercase US-ASCII hexadecimal digits.
val pp_binary_string : Format.formatter -> string -> unitpp_binary_string ppf s formats the bytes of s with lowercase US-ASCII hexadecimal digits.
val check_binary_string_length :
length:int ->
string ->
(string, string) resultcheck_binary_string_length ~length s checks that s has length bytes and errors otherwise.