Fix HashEngine.length name change to bytes_hashed
When `hashes_fuzz` is on the field `length` is refered to but it was changed to `bytes_hashed` in a previous PR. This has been fixed by changing `length` to `bytes_hashed`.
This commit is contained in:
parent
78bcca71ca
commit
d37b8a5dd2
|
@ -37,7 +37,7 @@ fn from_engine(mut e: HashEngine) -> Hash {
|
||||||
#[cfg(hashes_fuzz)]
|
#[cfg(hashes_fuzz)]
|
||||||
fn from_engine(e: HashEngine) -> Hash {
|
fn from_engine(e: HashEngine) -> Hash {
|
||||||
let mut res = e.midstate();
|
let mut res = e.midstate();
|
||||||
res[0] ^= (e.length & 0xff) as u8;
|
res[0] ^= (e.bytes_hashed & 0xff) as u8;
|
||||||
Hash(res)
|
Hash(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ macro_rules! engine_input_impl(
|
||||||
for c in inp {
|
for c in inp {
|
||||||
self.buffer[0] ^= *c;
|
self.buffer[0] ^= *c;
|
||||||
}
|
}
|
||||||
self.length += inp.len();
|
self.bytes_hashed += inp.len();
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue