| Crates.io | libcrypt-rs |
| lib.rs | libcrypt-rs |
| version | 0.1.2 |
| created_at | 2022-09-24 18:01:29.218267+00 |
| updated_at | 2022-09-24 23:54:43.664351+00 |
| description | rust binding for POSIX crypt library (libcrypt) |
| homepage | https://gitlab.com/Zapomnij/libcrypt-rs |
| repository | https://gitlab.com/Zapomnij/libcrypt-rs.git |
| max_upload_size | |
| id | 673141 |
| size | 9,125 |
Add to the dependencies section in your Cargo.toml:
libcrypt-rs = "0.1.2"
cargo has cool feature for generating documentation:
cargo doc
target/doc/libcrypt_rs/index.htmluse libcrypt_rs::{Crypt, Encryptions};
fn main() {
let mut crypt_engine = Crypt::new();
crypt_engine.gen_salt(Encryptions::Sha256).expect("Salt generating failed");
crypt_engine.encrypt("1234".to_string()).expect("Encryption failed");
println!("Encrypted data: {}", crypt_engine.encrypted);
}