passivized_htpasswd

Crates.iopassivized_htpasswd
lib.rspassivized_htpasswd
version0.0.6
sourcesrc
created_at2022-10-17 03:11:42.586672
updated_at2024-01-07 04:23:52.800482
descriptionGenerate htpasswd files
homepage
repositoryhttps://github.com/iamjpotts/passivized_htpasswd
max_upload_size
id689765
size9,393
(iamjpotts)

documentation

README

Generate htpasswd files with bcrypt passwords.

Example

use std::error::Error;
use passivized_htpasswd::errors::HtpasswdError;
use passivized_htpasswd::Htpasswd;

fn setup_credentials() -> Result<(), Box<dyn Error>> {
    let mut credentials = Htpasswd::new();

    credentials.set("John Doe", "Don't hardcode")?;
    credentials.write_to_path("www/.htpasswd")?;

    Ok(())
}
Commit count: 15

cargo fmt