diff --git a/src/hashing.rs b/src/hashing.rs index ea8758a1..3c74d1cb 100644 --- a/src/hashing.rs +++ b/src/hashing.rs @@ -47,6 +47,10 @@ use crate::{ keys::SecretKey, }; +/// Wrapper type for 256- and 512-bit `Blake2b` hashers +pub type Blake2b256 = Blake2b; +pub type Blake2b512 = Blake2b; + /// The `DomainSeparation` trait is used to inject domain separation tags into the [`DomainSeparatedHasher`] in a /// way that can be applied consistently, but without hard-coding anything into the hasher itself. /// @@ -418,9 +422,9 @@ impl LengthExtensionAttackResistant for Blake2bVar {} impl LengthExtensionAttackResistant for Sha3_256 {} -impl LengthExtensionAttackResistant for Blake2b {} +impl LengthExtensionAttackResistant for Blake2b256 {} -impl LengthExtensionAttackResistant for Blake2b {} +impl LengthExtensionAttackResistant for Blake2b512 {} //------------------------------------------------ HMAC ------------------------------------------------------------ /// A domain separation tag for use in MAC derivation algorithms.