INNER CODE UNIT · Rust
batch_verify
mratsim/constantine · constantine-rust/constantine-ethereum-bls-sig/src/lib.rs:332
pub fn batch_verify(
pubkeys: &[EthBlsPubKey],
messages: &Vec<Vec<u8>>,
signatures: &[EthBlsSignature],
secure_random_bytes: &[u8; 32],
) -> Result<bool, ctt_eth_bls_status> {
// TODO: do we really have to clone here, just to assign to CttSpan due to a *mut field?
// Funny irony, that we can hand (nested) pointers from Rust (contrary to Go), but pointer
// sanity logic makes us have to copy anyway?
let mut msg = messages.clone();
let spans = to_span(&mut msg);
unsafe {
let status = ctt_eth_bls_batch_verify(
pubkeys.as_ptr() as *const ctt_eth_bls_pubkey,
spans.as_ptr() as *const ctt_span,
signatures.as_ptr() as *const ctt_eth_bls_signature,
messages.len() as usize,