Function base64::encode

source ·
pub fn encode<T: AsRef<[u8]>>(input: T) -> String
Expand description

Encode arbitrary octets as base64 using the default engine. Returns a String.

Example

 let b64 = base64::encode(b"hello world");
 println!("{}", b64);