Crates.io | simple-aes |
lib.rs | simple-aes |
version | 1.0.1 |
source | src |
created_at | 2023-01-13 18:09:26.988234 |
updated_at | 2023-01-13 18:17:03.532088 |
description | A simple to use AES256-ctr encypter and decrypter based of the npm package(aes256) |
homepage | https://github.com/zedgell/simple-aes256 |
repository | https://github.com/zedgell/simple-aes256 |
max_upload_size | |
id | 758089 |
size | 4,963 |
A simple AES256-ctr based off the node-aes256 package
use simple_aes::{encrypt, decrypt};
fn main() {
// Key can be any length since it will be SHA256 hashed
let encrypt = encrypt("12345abcdef", "my-super-secret-key").unwrap();
let decrypt = decrypt(encrypt, "my-super-secret-key").unwrap();
assert_eq!(decrypt, "12345abcdef".to_string())
}
Vec<u8>
.