Merge rust-bitcoin/rust-bitcoin#2316: Fix some typos
cc45cfe3fe
Fix typos (shuoer86)3568b9b546
Fix typos (shuoer86) Pull request description: ACKs for top commit: apoelstra: ACKcc45cfe3fe
tcharding: ACKcc45cfe3fe
Tree-SHA512: a4abe767f07ee4120a1c9024fb6e5aa355918be451b28ee7efcdae05ce44aa63e2aa49e631ef734ea9190d137474345b0620c497b37ef1e66f383270759fa04c
This commit is contained in:
commit
d5c7061ae4
|
@ -213,7 +213,7 @@ impl ScriptBuf {
|
||||||
self.0.extend_from_slice(data.as_bytes());
|
self.0.extend_from_slice(data.as_bytes());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes the sum of `len` and the lenght of an appropriate push opcode.
|
/// Computes the sum of `len` and the length of an appropriate push opcode.
|
||||||
pub(in crate::blockdata::script) fn reserved_len_for_slice(len: usize) -> usize {
|
pub(in crate::blockdata::script) fn reserved_len_for_slice(len: usize) -> usize {
|
||||||
len + match len {
|
len + match len {
|
||||||
0..=0x4b => 1,
|
0..=0x4b => 1,
|
||||||
|
@ -277,7 +277,7 @@ impl ScriptBuf {
|
||||||
|
|
||||||
/// Converts this `ScriptBuf` into a [boxed](Box) [`Script`].
|
/// Converts this `ScriptBuf` into a [boxed](Box) [`Script`].
|
||||||
///
|
///
|
||||||
/// This method reallocates if the capacity is greater than lenght of the script but should not
|
/// This method reallocates if the capacity is greater than length of the script but should not
|
||||||
/// when they are equal. If you know beforehand that you need to create a script of exact size
|
/// when they are equal. If you know beforehand that you need to create a script of exact size
|
||||||
/// use [`reserve_exact`](Self::reserve_exact) before adding data to the script so that the
|
/// use [`reserve_exact`](Self::reserve_exact) before adding data to the script so that the
|
||||||
/// reallocation can be avoided.
|
/// reallocation can be avoided.
|
||||||
|
|
|
@ -61,7 +61,7 @@ pub extern crate base64;
|
||||||
/// Encodes and decodes the Bech32 forrmat.
|
/// Encodes and decodes the Bech32 forrmat.
|
||||||
pub extern crate bech32;
|
pub extern crate bech32;
|
||||||
|
|
||||||
/// Rust implementation of cryptographic hash function algorithems.
|
/// Rust implementation of cryptographic hash function algorithms.
|
||||||
pub extern crate hashes;
|
pub extern crate hashes;
|
||||||
|
|
||||||
/// Re-export the `hex-conservative` crate.
|
/// Re-export the `hex-conservative` crate.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Continuosly cycle over fuzz targets running each for 1 hour.
|
# Continuously cycle over fuzz targets running each for 1 hour.
|
||||||
# It uses chrt SCHED_IDLE so that other process takes priority.
|
# It uses chrt SCHED_IDLE so that other process takes priority.
|
||||||
#
|
#
|
||||||
# For hfuzz options see https://github.com/google/honggfuzz/blob/master/docs/USAGE.md
|
# For hfuzz options see https://github.com/google/honggfuzz/blob/master/docs/USAGE.md
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
This is a simple, no-dependency library which implements the hash functions
|
This is a simple, no-dependency library which implements the hash functions
|
||||||
needed by Bitcoin. These are SHA1, SHA256, SHA256d, SHA512, and RIPEMD160. As an
|
needed by Bitcoin. These are SHA1, SHA256, SHA256d, SHA512, and RIPEMD160. As an
|
||||||
ancilliary thing, it exposes hexadecimal serialization and deserialization,
|
ancillary thing, it exposes hexadecimal serialization and deserialization,
|
||||||
since these are needed to display hashes anway.
|
since these are needed to display hashes anway.
|
||||||
|
|
||||||
[Documentation](https://docs.rs/bitcoin_hashes/)
|
[Documentation](https://docs.rs/bitcoin_hashes/)
|
||||||
|
|
|
@ -101,7 +101,7 @@ fn from_engine<T: Tag>(e: sha256::HashEngine) -> Hash<T> {
|
||||||
/// says the midstate should be generated by hashing the supplied string in a way described in
|
/// says the midstate should be generated by hashing the supplied string in a way described in
|
||||||
/// BIP-341. Alternatively, you can supply `hash_bytes` to hash raw bytes. If you have the midstate
|
/// BIP-341. Alternatively, you can supply `hash_bytes` to hash raw bytes. If you have the midstate
|
||||||
/// already pre-computed and prefer **compiler** performance to readability you may use
|
/// already pre-computed and prefer **compiler** performance to readability you may use
|
||||||
/// `raw(MIDSTATE_BYTES, HASHED_BYTES_LENGHT)` instead.
|
/// `raw(MIDSTATE_BYTES, HASHED_BYTES_LENGTH)` instead.
|
||||||
///
|
///
|
||||||
/// Both visibility modifiers and attributes are optional and passed to inner structs (excluding
|
/// Both visibility modifiers and attributes are optional and passed to inner structs (excluding
|
||||||
/// `#[hash_newtype(...)]`). The attributes suffer same compiler performance limitations as in
|
/// `#[hash_newtype(...)]`). The attributes suffer same compiler performance limitations as in
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
//! SHA512_256 implementation.
|
//! SHA512_256 implementation.
|
||||||
//!
|
//!
|
||||||
//! SHA512/256 is a hash function that uses the sha512 alogrithm but it truncates
|
//! SHA512/256 is a hash function that uses the sha512 algorithm but it truncates
|
||||||
//! the output to 256 bits. It has different initial constants than sha512 so it
|
//! the output to 256 bits. It has different initial constants than sha512 so it
|
||||||
//! produces an entirely different hash compared to sha512. More information at
|
//! produces an entirely different hash compared to sha512. More information at
|
||||||
//! <https://eprint.iacr.org/2010/548.pdf>.
|
//! <https://eprint.iacr.org/2010/548.pdf>.
|
||||||
|
@ -16,7 +16,7 @@ use crate::{sha512, FromSliceError};
|
||||||
crate::internal_macros::hash_type! {
|
crate::internal_macros::hash_type! {
|
||||||
256,
|
256,
|
||||||
false,
|
false,
|
||||||
"Output of the SHA512/256 hash function.\n\nSHA512/256 is a hash function that uses the sha512 alogrithm but it truncates the output to 256 bits. It has different initial constants than sha512 so it produces an entirely different hash compared to sha512. More information at <https://eprint.iacr.org/2010/548.pdf>."
|
"Output of the SHA512/256 hash function.\n\nSHA512/256 is a hash function that uses the sha512 algorithm but it truncates the output to 256 bits. It has different initial constants than sha512 so it produces an entirely different hash compared to sha512. More information at <https://eprint.iacr.org/2010/548.pdf>."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_engine(e: HashEngine) -> Hash {
|
fn from_engine(e: HashEngine) -> Hash {
|
||||||
|
@ -27,7 +27,7 @@ fn from_engine(e: HashEngine) -> Hash {
|
||||||
|
|
||||||
/// Engine to compute SHA512/256 hash function.
|
/// Engine to compute SHA512/256 hash function.
|
||||||
///
|
///
|
||||||
/// SHA512/256 is a hash function that uses the sha512 alogrithm but it truncates
|
/// SHA512/256 is a hash function that uses the sha512 algorithm but it truncates
|
||||||
/// the output to 256 bits. It has different initial constants than sha512 so it
|
/// the output to 256 bits. It has different initial constants than sha512 so it
|
||||||
/// produces an entirely different hash compared to sha512. More information at
|
/// produces an entirely different hash compared to sha512. More information at
|
||||||
/// <https://eprint.iacr.org/2010/548.pdf>.
|
/// <https://eprint.iacr.org/2010/548.pdf>.
|
||||||
|
|
Loading…
Reference in New Issue