use std::str;
use base64::{encode, decode};
fn main() -> Result<()> {
let hello = "hello rustaceans";
let encoded = encode(hello);
println!("origin: {}", str::from_utf8(hello)?);
println!("base64 encoded: {}", encoded);
Ok(())
}
Encode to base64
from string to base64
0 Comments
Add Comment
Log in to add a comment