Registry / crypto / magic-crypt

magic-crypt

JSON →
library4.0.1rscratesunverified

Encrypt and decrypt strings, files, or data using DES or AES algorithms with CBC mode and PKCS7 padding.

# Cargo.toml [dependencies] magic-crypt = "4.0.1"
INSTALL
IMPORT
SIG · MAGIC-CRYPT
M
magic-crypt
cryptorustv4.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MagicCrypt
use magic_crypt::MagicCrypt;

Encrypt a string using AES-256

use magic_crypt::MagicCrypt; fn main() { let mc = MagicCrypt::new("key", 256); let encrypted = mc.encrypt_str_to_base64("Hello"); println!("Encrypted: {}", encrypted); }
Debug
Known issues
gotchaDefault key derivation may be insecure; use a strong key and consider proper key management.
fix
Use a cryptographically random key and store it securely.
affects: >=0.0.0
Upgrade
Version history
4.0.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
magic-crypt — cargo add magic-crypt · libregistry