Crates.io | suc |
lib.rs | suc |
version | 0.1.0 |
source | src |
created_at | 2021-05-31 17:38:10.888902 |
updated_at | 2021-05-31 17:38:10.888902 |
description | (Simple) Secure (Filebased) User Credentials |
homepage | |
repository | https://github.com/AlexanderHeim/suc |
max_upload_size | |
id | 404352 |
size | 10,220 |
SUC offers one thing: A quick way to save and hash user credentials.
If your project..
..then SUC is the right thing for you!
Hashing is done using the argon2 Rust crate with the default options. The hash is saved to the file in the PHC format. Salt is generated using OsRng.
use suc::sucfile::SucFile;
fn main() {
let mut sf = SucFile::open("test.suc").unwrap();
sf.add("Alexander", "4312541").unwrap();
println!("{}", sf.check("Alexander", "4312541").unwrap());
sf.remove("Alexander").unwrap();
}