Constant data_encoding::HEXLOWER_PERMISSIVE [] [src]

pub const HEXLOWER_PERMISSIVE: &'static NoPad = HEXLOWER_PERMISSIVE_IMPL

Lower-case permissive hexadecimal encoding

This encoding is a static version of:

let mut base = Builder::new(b"0123456789abcdef")
    .translate(b"ABCDEF", b"abcdef").no_pad().unwrap();
assert_eq!(HEXLOWER_PERMISSIVE, &base);

Examples

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

You can also define a shorter name:

use data_encoding::{HEXLOWER_PERMISSIVE, NoPad};
const HEX: &'static NoPad = HEXLOWER_PERMISSIVE;