Rust base64::decode
Decodes a base64 string
Function
pub fn decode(input: &str) -> Result
Parameters
input - encoded string
Return value
Returns a Result containing a Vec
Example
extern crate base64; use std::str; fn main() { let bytes = base64::decode("YmFzZTY0IGRlY29kZQ==").unwrap(); let str = str::from_utf8(&bytes).unwrap(); println!("{}", str); }
Github
github.com/base64decoder/examples/blob/master/base64_decode.rs