MCPcopy Create free account
hub / github.com/BitVM/BitVM / hex_string_to_nibble_array

Function hex_string_to_nibble_array

bitvm/src/chunk/helpers.rs:64–69  ·  view source on GitHub ↗
(hex_string: &str)

Source from the content-addressed store, hash-verified

62 );
63
64 fn hex_string_to_nibble_array(hex_string: &str) -> Vec<u8> {
65 hex_string
66 .chars()
67 .map(|c| c.to_digit(16).expect("Invalid hex character") as u8) // Convert each char to a nibble
68 .collect()
69 }
70
71 fn nib_to_byte_array(digits: &[u8]) -> Vec<u8> {
72 let mut msg_bytes = Vec::with_capacity(digits.len() / 2);

Callers 1

extern_hash_fp_varFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected