MCPcopy Create free account
hub / github.com/BitVM/BitVM / extern_hash_fps

Function extern_hash_fps

bitvm/src/chunk/helpers.rs:44–52  ·  view source on GitHub ↗
(fqs: Vec<ark_bn254::Fq>)

Source from the content-addressed store, hash-verified

42}
43
44pub(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
54pub(crate) fn extern_hash_nibbles(msgs: Vec<[u8; 64]>) -> [u8; 64] {
55 assert!(

Callers 6

to_hashMethod · 0.85
hash_tMethod · 0.85
hash_leMethod · 0.85

Calls 4

fq_to_chunked_bitsFunction · 0.85
extern_hash_nibblesFunction · 0.85
intoMethod · 0.45
pushMethod · 0.45