| 153 | } |
| 154 | |
| 155 | fn digest_binary_array_impl<'a, BinaryArrType>( |
| 156 | self, |
| 157 | input_value: &BinaryArrType, |
| 158 | ) -> ArrayRef |
| 159 | where |
| 160 | BinaryArrType: BinaryArrayType<'a>, |
| 161 | { |
| 162 | match self { |
| 163 | Self::Md5 => digest_to_array!(md5, Md5, input_value), |
| 164 | Self::Sha224 => digest_to_array!(sha2, Sha224, input_value), |
| 165 | Self::Sha256 => digest_to_array!(sha2, Sha256, input_value), |
| 166 | Self::Sha384 => digest_to_array!(sha2, Sha384, input_value), |
| 167 | Self::Sha512 => digest_to_array!(sha2, Sha512, input_value), |
| 168 | Self::Blake2b => digest_to_array!(blake2, Blake2b512, input_value), |
| 169 | Self::Blake2s => digest_to_array!(blake2, Blake2s256, input_value), |
| 170 | Self::Blake3 => { |
| 171 | let binary_array: BinaryArray = input_value |
| 172 | .iter() |
| 173 | .map(|opt| { |
| 174 | opt.map(|x| { |
| 175 | let mut digest = Blake3::default(); |
| 176 | digest.update(x); |
| 177 | Blake3::finalize(&digest).as_bytes().to_vec() |
| 178 | }) |
| 179 | }) |
| 180 | .collect(); |
| 181 | Arc::new(binary_array) |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | pub(crate) fn digest_process( |