MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / hex_digit

Function hex_digit

nodedb-cluster/src/auth/join_token.rs:140–147  ·  view source on GitHub ↗
(b: u8)

Source from the content-addressed store, hash-verified

138}
139
140fn hex_digit(b: u8) -> Option<u8> {
141 match b {
142 b'0'..=b'9' => Some(b - b'0'),
143 b'a'..=b'f' => Some(10 + b - b'a'),
144 b'A'..=b'F' => Some(10 + b - b'A'),
145 _ => None,
146 }
147}
148
149#[cfg(test)]
150mod tests {

Callers 1

hex_decodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected