Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
RustCrypto: SHA-3
Pure Rust implementation of the SHA-3 cryptographic hash algorithms.
There are 6 standard algorithms specified in the SHA-3 standard:
SHA3-224
SHA3-256
SHA3-384
SHA3-512
SHAKE128
, an extendable output function (XOF)SHAKE256
, an extendable output function (XOF)Keccak224
,Keccak256
,Keccak384
,Keccak512
(NIST submission without padding changes)
This crates additionally supports the TurboSHAKE
XOF variant.
Examples
Output size of SHA3-256 is fixed, so its functionality is usually
accessed via the Digest
trait:
use hex;
use ;
let mut hasher = new;
hasher.update;
let hash = hasher.finalize;
assert_eq!;
// Hex-encode hash using https://docs.rs/base16ct
let hex_hash = encode_string;
assert_eq!;
SHAKE functions have an extendable output, so finalization method returns
XOF reader from which results of arbitrary length can be read. Note that
these functions do not implement Digest
, so lower-level traits have to
be imported:
use ;
use hex;
let mut hasher = default;
hasher.update;
let mut reader = hasher.finalize_xof;
let mut buf = ;
reader.read;
assert_eq!;
Also, see the examples section in the RustCrypto/hashes readme.
Minimum Supported Rust Version
Rust 1.71 or higher.
Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump.
SemVer Policy
- All on-by-default features of this library are covered by SemVer
- MSRV is considered exempt from SemVer as noted above
License
The crate is licensed under either of:
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.