Function rb64::decode

source ·
pub fn decode(text: &str) -> Result<Vec<u8>>
Expand description

Decode a Base64-encoded string

This function returns a Vec<u8> with the content of the given string.

The text does not need to be padded with ‘=’

§Example

use rb64::decode;

let bytes = decode("SGVsbG8gd29ybGQh").unwrap();
let msg = String::from_utf8(bytes).unwrap();
assert_eq!(msg, "Hello world!");