pub const HEXUPPER_PERMISSIVE: Encoding;
Expand description

Uppercase hexadecimal encoding with case-insensitive decoding

This encoding is a static version of:

let mut spec = Specification::new();
spec.symbols.push_str("0123456789ABCDEF");
spec.translate.from.push_str("abcdef");
spec.translate.to.push_str("ABCDEF");
assert_eq!(HEXUPPER_PERMISSIVE, spec.encoding().unwrap());

Examples

use data_encoding::HEXUPPER_PERMISSIVE;
let deadbeef = vec![0xde, 0xad, 0xbe, 0xef];
assert_eq!(HEXUPPER_PERMISSIVE.decode(b"DeadBeef").unwrap(), deadbeef);
assert_eq!(HEXUPPER_PERMISSIVE.encode(&deadbeef), "DEADBEEF");