1 unstable release
0.1.0 | Apr 8, 2024 |
---|
#548 in Cryptography
81 downloads per month
7KB
88 lines
cryptotools
cryptotools is a cryptography library, with it you can:
- Encode to base64
- Decode the base64 value
- Encrypt to md5
Installing
In the file Cargo.toml
[dependencies]
cryptotools = "1.0.0"
Using
In the first example, if you want to encode and decode base64
use cryptotools::encode_base64::encode_base64;
use cryptotools::decode_base64::decode_base64;
// Encode
let encode = encode_base64("123456789");
println!("{}", encode);
// Decode
let decode = decode_base64("MTIzNDU2Nzg5");
let decode_string = String::from_utf8(decode).unwrap();
println!("{}", decode_string);
To encrypt a value to md5
use cryptotools::encrypt_md5::encrypt_md5;
let md5 = encrypt_md5("9999");
println!("{}", md5);
Contributing
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.
License
cryptotools is released under the MIT license. See LICENSE for details.
Dependencies
~18KB