2 unstable releases

new 0.2.0 May 15, 2024
0.1.0 Apr 8, 2024

#534 in Cryptography

Download history 72/week @ 2024-04-03 26/week @ 2024-04-10

54 downloads per month

MIT license

8KB
104 lines

cryptotools

CI Crates.io Msrv Downloads Docs License

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 = "0.2.0"

Usage

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);

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