cryptotools is a simple, easy-to-use library for cryptographic utilities in Rust. It currently provides the following:
- Base64 encoding
- Base64 decoding
- MD5 encryption (hashing)
cargo add cryptotools
[dependencies]
cryptotools = "0.3.0"use cryptotools::encode_base64::Base64Encode;
use cryptotools::decode_base64::Base64Decode;
let input = "hello world";
let encoded = Base64Encode::encode(input);
println!("Base64 Encoded: {}", encoded);
let decoded = Base64Decode::decode(&encoded);
println!("Base64 Decoded: {}", decoded);use cryptotools::encrypt_md5::MD5;
let input = "password123";
let hash = MD5::encrypt(input);
println!("MD5 Hash: {}", hash);cryptotools is released under the MIT license. See LICENSE for details.