encode

Function encode 

Source
pub fn encode(bytes: &[u8]) -> String
Expand description

Encode an array of bytes into base64 data.

Note: probably slower than using a standalone library to perform this conversion. However, it’s very neat :3

use big_int::base64::*;

assert_eq!(encode(b"Hello world!"), "SGVsbG8gd29ybGQh");