Constant data_encoding::HEXUPPER_PERMISSIVE
[−]
[src]
pub const HEXUPPER_PERMISSIVE: Encoding=
HEXUPPER_PERMISSIVE_IMPL
Upper-case permissive hexadecimal encoding
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");