Comment for why 7 bytes

This commit is contained in:
wborgeaud 2021-12-20 09:22:23 +01:00
parent d594b8fc2d
commit 0538511c9d

View File

@ -161,6 +161,7 @@ impl<const N: usize> From<BytesHash<N>> for u64 {
impl<F: RichField, const N: usize> From<BytesHash<N>> for Vec<F> {
fn from(hash: BytesHash<N>) -> Self {
hash.0
// Chunks of 7 bytes since 8 bytes would allow collisions.
.chunks(7)
.map(|bytes| {
let mut arr = [0; 8];