decode_to_vec

Function decode_to_vec 

Source
pub fn decode_to_vec(input: &[u8]) -> Result<Vec<u8>, DecodeError>
Expand description

Decode base64-encoded input into a new Vec<u8>.

ยงExample

use weakauras_codec_base64::{decode::decode_to_vec, error::DecodeError};

fn main() -> Result<(), DecodeError> {
    assert_eq!(decode_to_vec(b"ivgBS9glGC3BYXgzHa")?, b"Hello, world!");
    Ok(())
}