base64 0.9.2

encodes and decodes base64 as bytes or utf8
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate base64;

use base64::*;

pub fn compare_decode(expected: &str, target: &str) {
    assert_eq!(
        expected,
        String::from_utf8(decode(target).unwrap()).unwrap()
    );
    assert_eq!(
        expected,
        String::from_utf8(decode(target.as_bytes()).unwrap()).unwrap()
    );
}