Base64 Decode Base64 Encode Image to Base64 Base64 to Image

Rust base64::decode

Decodes a base64 string


pub fn decode(input: &str) -> Result, Base64Error>


input - encoded string

Return value

Returns a Result containing a Vec

extern crate base64;
use std::str;

fn main() {
    let bytes = base64::decode("YmFzZTY0IGRlY29kZQ==").unwrap();
    let str = str::from_utf8(&bytes).unwrap();
    println!("{}", str);
Github uses cookies for personalization and functionality. By continuing using this website, you agree to our use of cookies. More info