5 releases
| 0.0.6 | Jan 7, 2024 |
|---|---|
| 0.0.5 | Aug 31, 2023 |
| 0.0.3 | Dec 4, 2022 |
| 0.0.2 | Oct 17, 2022 |
| 0.0.1 | Oct 17, 2022 |
#1199 in Authentication
184 downloads per month
Used in 2 crates
10KB
178 lines
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(())
}
Dependencies
~2.6–3.5MB
~68K SLoC