Function short_crypt::base64::decode[]

pub fn decode<T>(input: &T) -> Result<Vec<u8>, DecodeError> where
    T: AsRef<[u8]> + ?Sized

Decode from string reference as octets. Returns a Result containing a Vec. Convenience decode_config(input, base64::STANDARD);.

Example

extern crate base64;

fn main() {
    let bytes = base64::decode("aGVsbG8gd29ybGQ=").unwrap();
    println!("{:?}", bytes);
}