password-auth 2.0.0

Password authentication library with a focus on simplicity and ease-of-use, including support for Argon2, PBKDF2, and scrypt password hashing algorithms
Documentation
# [RustCrypto]: Password Authentication

[![crate][crate-image]][crate-link]
[![Docs][docs-image]][docs-link]
[![Build Status][build-image]][build-link]
![Apache2/MIT licensed][license-image]
![Rust Version][rustc-image]
[![Project Chat][chat-image]][chat-link]

Password authentication library with a focus on simplicity and ease-of-use,
with support for [Argon2], [PBKDF2], and [scrypt] password hashing algorithms.

## About

`password-auth` is a high-level password authentication library with a simple
interface which eliminates as much complexity and user choice as possible.

It wraps pure Rust implementations of multiple password hashing algorithms
maintained by the [RustCrypto] organization, with the goal of providing a
stable interface while allowing the password hashing algorithm implementations
to evolve at a faster pace.

## Usage

The core API consists of two functions:

- [`generate_hash`]: generates a password hash from the provided password. The
- [`verify_password`]: verifies the provided password against a password hash,
  returning an error if the password is incorrect.

Behind the scenes the crate uses the multi-algorithm support in the
[`password-hash`] crate to support multiple password hashing algorithms
simultaneously. By default, it supports Argon2 (using the latest OWASP
recommended parameters), but it can also optionally support PBKDF2 and scrypt
by enabling crate features.

When multiple algorithms are enabled, it will still default to Argon2 for
`generate_hash`, but will be able to verify password hashes from PBKDF2 and
scrypt as well, if you have them in your password database.

## SemVer Policy

MSRV increases are not considered breaking changes and can happen in patch releases.

The crate MSRV accounts for all supported targets and crate feature combinations.

Users who depend on specific versions of the `getrandom` crate should pin to specific minor versions
of `password-auth`, as we reserve the right to upgrade `getrandom` without bumping major versions.

## License

Licensed under either of:

 * [Apache License, Version 2.0]http://www.apache.org/licenses/LICENSE-2.0
 * [MIT license]http://opensource.org/licenses/MIT

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.

[//]: # (badges)

[crate-image]: https://img.shields.io/crates/v/password-auth?logo=rust
[crate-link]: https://crates.io/crates/password-auth
[docs-image]: https://docs.rs/password-auth/badge.svg
[docs-link]: https://docs.rs/password-auth/
[build-image]: https://github.com/RustCrypto/password-hashes/actions/workflows/password-auth.yml/badge.svg
[build-link]: https://github.com/RustCrypto/password-hashes/actions/workflows/password-auth.yml
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260046-password-hashes

[//]: # (links)

[RustCrypto]: https://github.com/RustCrypto/
[Argon2]: https://en.wikipedia.org/wiki/Argon2
[PBKDF2]: https://en.wikipedia.org/wiki/PBKDF2
[scrypt]: https://en.wikipedia.org/wiki/Scrypt
[`generate_hash`]: https://docs.rs/password-auth/latest/password_auth/fn.generate_hash.html
[`verify_password`]: https://docs.rs/password-auth/latest/password_auth/fn.verify_password.html
[`password-hash`]: https://docs.rs/password-hash/latest/password_hash/