crypticy

Crates.iocrypticy
lib.rscrypticy
version0.2.2
sourcesrc
created_at2024-03-19 19:16:04.042624
updated_at2024-03-21 18:48:20.927527
descriptionA simple cryptography library in Rust
homepage
repository
max_upload_size
id1179568
size3,832
Philip (xStFtx)

documentation

README

Crypticy

This Rust crate provides functionalities for AES encryption using AES256 and SHA256 hashing.

Usage

Add this crate to your Cargo.toml file:

[dependencies]
crypticy = "*"

Then, you can use the crate in your Rust code as follows:

extern crate aes_encryption;

use aes_encryption::{generate_aes_key, aes_encrypt, aes_decrypt, sha256_hash};

fn main() {
    // Generate a random AES key
    let key = generate_aes_key();

    // Encrypt data using AES256
    let plaintext = b"Your data here";
    let ciphertext = aes_encrypt(plaintext, &key);

    // Decrypt data using AES256
    let decrypted = aes_decrypt(&ciphertext, &key).unwrap();

    // Compute SHA256 hash
    let data = b"Your data here";
    let hash = sha256_hash(data);
}

License

This crate is licensed under the MIT License.

Commit count: 0

cargo fmt