(fqs: Vec<ark_bn254::Fq>)
| 42 | } |
| 43 | |
| 44 | pub(crate) fn extern_hash_fps(fqs: Vec<ark_bn254::Fq>) -> [u8; 64] { |
| 45 | let mut msgs: Vec<[u8; 64]> = Vec::new(); |
| 46 | for fq in fqs { |
| 47 | let v = fq_to_chunked_bits(fq.into(), 4); |
| 48 | let nib_arr: Vec<u8> = v.into_iter().map(|x| x as u8).collect(); |
| 49 | msgs.push(nib_arr.try_into().unwrap()); |
| 50 | } |
| 51 | extern_hash_nibbles(msgs) |
| 52 | } |
| 53 | |
| 54 | pub(crate) fn extern_hash_nibbles(msgs: Vec<[u8; 64]>) -> [u8; 64] { |
| 55 | assert!( |