| Crates.io | base64-lib |
| lib.rs | base64-lib |
| version | 0.2.2 |
| created_at | 2017-09-24 00:14:59.812836+00 |
| updated_at | 2018-04-29 00:41:11.085447+00 |
| description | A base64 encoder / decoder |
| homepage | https://gitlab.com/jeremymreed/base64-lib.git |
| repository | https://gitlab.com/jeremymreed/base64-lib.git |
| max_upload_size | |
| id | 32817 |
| size | 26,401 |
==========================================
At the top of the file:
extern crate base64_lib;
let input_vector: Vec<u8> = String::from("Hello World").into_bytes();
let result_string: String = base64_lib::encode(&input_vector);
let input_string: String = String::from("SGVsbG8gV29ybGQ=");
let result_vector: Vec<u8> = base64_lib::decode(&input_string);
let input_vector: Vec<u8> = String::from("Hello World").into_bytes();
let alphabet: String = String::from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
let result_string: String = base64_lib::encode_with_alphabet(&input_vector, &alphabet);
let input_string: String = String::from("SGVsbG8gV29ybGQ=");
let alphabet: String = String::from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
let result_vector: Vec<u8> = base64_lib::decode_with_alphabet(&input_string, &alphabet);