MagicCrypt is a Java/PHP/NodeJS/Rust library to encrypt/decrpyt strings, files, or data, using Data Encryption Standard(DES) or Advanced Encryption Standard(AES) algorithms. It supports CBC block cipher mode, PKCS5 padding and 64, 128, 192 or 256-bits key length. If the encrypted data is a string, it will be formatted automatically to Base64.
```
use magic_crypt::MagicCrypt;
let mut mc: MagicCrypt = newmagiccrypt!("magickey", 256);
let base64 = mc.encryptstrto_base64("http://magiclen.org");
assert_eq!("DS/2U8royDnJDiNY2ps3f6ZoTbpZo8ZtUGYLGEjwLDQ=", base64);
asserteq!("http://magiclen.org", mc.decryptbase64tostring(&base64).unwrap()); ```
https://crates.io/crates/rust-magiccrypt
https://docs.rs/rust-magiccrypt
Refer to https://github.com/magiclen/MagicCrypt.
Refer to https://github.com/magiclen/MagicCrypt.
Refer to https://github.com/magiclen/node-magiccrypt.
Please check out our web page at
https://magiclen.org/aes/