INNER CODE UNIT · Rust

derive_pubkey

mratsim/constantine · constantine-rust/constantine-ethereum-bls-sig/src/lib.rs:34

pub fn derive_pubkey(skey: EthBlsSecKey) -> EthBlsPubKey {
    let mut result: MaybeUninit<EthBlsPubKey> = MaybeUninit::uninit();
    unsafe {
        ctt_eth_bls_derive_pubkey(
            result.as_mut_ptr() as *mut ctt_eth_bls_pubkey,
            &skey as *const ctt_eth_bls_seckey,
        );
        return result.assume_init();
    }
}

#[must_use]
pub fn pubkeys_are_equal(pkey1: EthBlsPubKey, pkey2: EthBlsPubKey) -> bool {
    unsafe {
        return ctt_eth_bls_pubkeys_are_equal(
            &pkey1 as *const ctt_eth_bls_pubkey,
            &pkey2 as *const ctt_eth_bls_pubkey,
        ) as bool;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…