Function short_crypt::base64::encode_config_buf [−]
pub fn encode_config_buf<T>(input: &T, config: Config, buf: &mut String) where
T: AsRef<[u8]> + ?Sized,
Encode arbitrary octets as base64. Writes into the supplied output buffer, which will grow the buffer if needed.
Example
extern crate base64; fn main() { let mut buf = String::new(); base64::encode_config_buf(b"hello world~", base64::STANDARD, &mut buf); println!("{}", buf); buf.clear(); base64::encode_config_buf(b"hello internet~", base64::URL_SAFE, &mut buf); println!("{}", buf); }