Skip to main content

decode

Function decode 

Source
pub fn decode(text: &str) -> Result<Vec<u8>, &'static str>
Expand description

Decodes standard base64; padding is optional, whitespace is not allowed.

assert_eq!(hardless_core::base64::decode("G0A=").unwrap(), b"\x1b@");
assert!(hardless_core::base64::decode("G0A?").is_err());