cryptotools is a cryptography library, with it you can:
- Encode to base64
- Decode the base64 value
- Encrypt to md5
In the file Cargo.toml
[dependencies]
cryptotools = "0.2.0"
In the first example, if you want to encode and decode base64
use cryptotools::encode_base64::Base64Encode;
use cryptotools::decode_base64::Base64Decode;
// Encode
let encode = Base64Encode::encode("123456789");
println!("{}", encode);
// Decode
let decode = Base64Decode::decode("MTIzNDU2Nzg5");
println!("{}", decode);
To encrypt a value to md5
use cryptotools::encrypt_md5::MD5;
let md5 = MD5::encrypt("9999");
println!("{}", md5);
To contribute, just fork this project and then open a pull request, feel free to contribute, bring ideas and raise any problem in the issue tab.
cryptotools is released under the MIT license. See LICENSE for details.