Function zbase32::decode [] [src]

pub fn decode(zbase32: &[u8], bits: u64) -> Result<Vec<u8>, &'static str>

Decode first N bits of given zbase32 encoded data

Panic

Panics if zbase32 decoded is shorter than N bits.

use zbase32;

assert_eq!(zbase32::decode(b"o", 1).unwrap(), &[0x80]);