MCPcopy Create free account
hub / github.com/RustCrypto/utils / encode_hex

Function encode_hex

blobby/src/bin/decode.rs:14–20  ·  view source on GitHub ↗
(data: &[u8])

Source from the content-addressed store, hash-verified

12 use std::{env, fs::File};
13
14 fn encode_hex(data: &[u8]) -> String {
15 let mut res = String::with_capacity(2 * data.len());
16 for &byte in data {
17 res.push_str(&format!("{byte:02X}"));
18 }
19 res
20 }
21
22 fn decode<R: BufRead, W: Write>(mut reader: R, mut writer: W) -> io::Result<usize> {
23 let mut data = Vec::new();

Callers 1

decodeFunction · 0.85

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected