# [RustCrypto]: SHA-crypt password hash

[![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]

Pure Rust implementation of the [SHA-crypt password hash based on SHA-256/SHA-512][SHA-crypt],
a legacy password hashing scheme supported by the [POSIX crypt C library][crypt].

Password hashes using this algorithm start with `$5$` or `$6$` when encoded using the
[Modular Crypt Format (MCF)][MCF].

## 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/sha-crypt
[crate-link]: https://crates.io/crates/sha-crypt
[docs-image]: https://docs.rs/sha-crypt/badge.svg
[docs-link]: https://docs.rs/sha-crypt/
[build-image]: https://github.com/RustCrypto/password-hashes/actions/workflows/sha-crypt.yml/badge.svg
[build-link]: https://github.com/RustCrypto/password-hashes/actions/workflows/sha-crypt.yml 
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.81+-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
[SHA-crypt]: https://www.akkadia.org/drepper/SHA-crypt.txt
[crypt]: https://en.wikipedia.org/wiki/Crypt_(C)
[MCF]: https://passlib.readthedocs.io/en/stable/modular_crypt_format.html
