RustCrypto: hashes

All algorithms reside in the separate crates and implemented using traits from
digest crate. Additionally all crates do not
require the standard library (i.e. no_std capable) and can be easily used for
bare-metal or WebAssembly programming.

Supported algorithms

Note: For new applications, or where compatibility with other existing
standards is not a primary concern, we strongly recommend to use either
BLAKE2, SHA-2 or SHA-3.

Security Level Legend

The following describes the security level ratings associated with each
hash function (i.e. algorithms, not the specific implementation):

Heart

Description

💚

No known successful attacks

💛

Theoretical break: security lower than claimed

💔

Attack demonstrated in practice: avoid if at all possible

Minimum Supported Rust Version (MSRV)

All crates in this repository support Rust 1.21 or higher. In future
minimally supported version of Rust can be changed, but it will be done with
a minor version bump.

Crate names

Whenever possible crates are published under the the same name as the crate
folder. Owners of md5 and sha1 crates declined
(1,
2) to participate in this
project. This is why crates marked by ❗️ are published under
md-5 and sha-1 names respectively.

Usage

Let us demonstrate how to use crates in this repository using BLAKE2b as an
example.

First add blake2 crate to your Cargo.toml:

[dependencies]blake2 ="0.8"

blake2 and other crates re-export digest crate and Digest trait for
convenience, so you don't have to add digest crate as an explicit dependency.

License

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.