Add engine function to siphash24::Hash
The other hashes that require initial state (keys etc) both have an `engine` function on the hash type because they cannot use the `GeneralHash::engine` function. Add an `engine` function to the `siphash24::Hash` type.
This commit is contained in:
parent
6ba756b246
commit
1bcfc80fe7
|
@ -168,6 +168,9 @@ impl crate::HashEngine for HashEngine {
|
|||
}
|
||||
|
||||
impl Hash {
|
||||
/// Constructs a new SipHash24 engine with keys.
|
||||
pub fn engine(k0: u64, k1: u64) -> HashEngine { HashEngine::with_keys(k0, k1) }
|
||||
|
||||
/// Produces a hash from the current state of a given engine.
|
||||
pub fn from_engine(e: HashEngine) -> Hash { from_engine(e) }
|
||||
|
||||
|
|
Loading…
Reference in New Issue