mirror of
https://github.com/BLAKE3-team/BLAKE3
synced 2024-05-12 18:56:26 +02:00
Merge 0031abcebd
into 4ec3be8bfa
This commit is contained in:
commit
6770edb403
|
@ -221,6 +221,12 @@ fn counter_high(counter: u64) -> u32 {
|
|||
#[derive(Clone, Copy, Hash)]
|
||||
pub struct Hash([u8; OUT_LEN]);
|
||||
|
||||
|
||||
/// Provided to allow for construction of magic hash values (eg null commit in git as [0; OUT_LEN])
|
||||
pub const fn construct_magic_hash(bytes: [u8; OUT_LEN]) -> Hash {
|
||||
Hash(bytes)
|
||||
}
|
||||
|
||||
impl Hash {
|
||||
/// The raw bytes of the `Hash`. Note that byte arrays don't provide
|
||||
/// constant-time equality checking, so if you need to compare hashes,
|
||||
|
|
Loading…
Reference in New Issue