mirror of
https://github.com/BLAKE3-team/BLAKE3
synced 2024-09-23 22:40:47 +02:00
docs tweaks
This commit is contained in:
parent
e6e4e6d687
commit
ab88db1aed
@ -6,3 +6,6 @@ are provided in Rust, enabled by default, with dynamic CPU feature
|
|||||||
detection. AVX-512 and NEON implementation are available via C FFI,
|
detection. AVX-512 and NEON implementation are available via C FFI,
|
||||||
controlled by the `c_avx512` and `c_neon` features. Rayon-based
|
controlled by the `c_avx512` and `c_neon` features. Rayon-based
|
||||||
multi-threading is controlled by the `rayon` feature.
|
multi-threading is controlled by the `rayon` feature.
|
||||||
|
|
||||||
|
Eventually docs will be published on docs.rs. For now, you can build and
|
||||||
|
view the docs locally with `cargo doc --open`.
|
||||||
|
@ -19,14 +19,11 @@
|
|||||||
//! let hash2 = hasher.finalize();
|
//! let hash2 = hasher.finalize();
|
||||||
//! assert_eq!(hash1, hash2);
|
//! assert_eq!(hash1, hash2);
|
||||||
//!
|
//!
|
||||||
//! // Extended output.
|
//! // Extended output. OutputReader implements std::io::Read.
|
||||||
//! # #[cfg(feature = "std")] {
|
//! # #[cfg(feature = "std")] {
|
||||||
//! let mut output = Vec::new();
|
//! let mut output = Vec::new();
|
||||||
//! blake3::Hasher::new()
|
//! let mut output_reader = hasher.finalize_xof();
|
||||||
//! .update(b"foobarbaz")
|
//! output_reader.take(1000).read_to_end(&mut output)?;
|
||||||
//! .finalize_xof()
|
|
||||||
//! .take(1000)
|
|
||||||
//! .read_to_end(&mut output)?;
|
|
||||||
//! assert_eq!(output.len(), 1000);
|
//! assert_eq!(output.len(), 1000);
|
||||||
//! assert_eq!(&output[..32], hash1.as_bytes());
|
//! assert_eq!(&output[..32], hash1.as_bytes());
|
||||||
//! # }
|
//! # }
|
||||||
|
Loading…
Reference in New Issue
Block a user