Constant data_encoding::HEXUPPER
source · [−]pub const HEXUPPER: Encoding;
Expand description
Uppercase hexadecimal encoding
This encoding is a static version of:
let mut spec = Specification::new();
spec.symbols.push_str("0123456789ABCDEF");
assert_eq!(HEXUPPER, spec.encoding().unwrap());
It is compliant with RFC4648 and known as “base16” or “hex”.
Examples
use data_encoding::HEXUPPER;
let deadbeef = vec![0xde, 0xad, 0xbe, 0xef];
assert_eq!(HEXUPPER.decode(b"DEADBEEF").unwrap(), deadbeef);
assert_eq!(HEXUPPER.encode(&deadbeef), "DEADBEEF");