Skip to main content

encode

Function encode 

Source
pub fn encode(bytes: &[u8]) -> String
Expand description

Encode a byte slice as a lowercase hexadecimal string.

ยงExamples

use modo::encoding::hex;

assert_eq!(hex::encode(b"\xde\xad\xbe\xef"), "deadbeef");
assert_eq!(hex::encode(b""), "");