binius_hash/vision/
compression.rs1use digest::{Digest, Output};
4
5use super::digest::VisionHasherDigest;
6use crate::PseudoCompressionFunction;
7
8#[derive(Debug, Default, Clone)]
10pub struct Vision32Compression;
11
12impl PseudoCompressionFunction<Output<VisionHasherDigest>, 2> for Vision32Compression {
13 fn compress(&self, input: [Output<VisionHasherDigest>; 2]) -> Output<VisionHasherDigest> {
14 VisionHasherDigest::new()
15 .chain_update(input[0].as_slice())
16 .chain_update(input[1].as_slice())
17 .finalize()
18 }
19}