bas64 0.1.0

Base64, but a bit smaller. Hints the name... not recommended for advanced projects but simple scripts! Because Base64 made decode way to long...
Documentation
1
2
3
4
5
6
7
8
9
use base64::{engine::general_purpose::STANDARD, Engine};
    
pub fn encode<T: AsRef<[u8]>>(input: T) -> String {
    STANDARD.encode(input)
}

pub fn decode<T: AsRef<[u8]>>(input: T) -> Result<Vec<u8>, base64::DecodeError> {
    STANDARD.decode(input)
}