Function big_int::base64_encode
source · pub fn base64_encode(bytes: &[u8]) -> StringExpand 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
Note: may fail if the data begins with zeros.
use big_int::*;
assert_eq!(base64_encode(b"Hello world!"), "SGVsbG8gd29ybGQh");