pub extern "C" fn avk_key_registration(
    keys: *const PublicKeyPoPPtr,
    nr_signers: usize,
    avk_key: *mut RegistrationPtr,
) -> i64 {
    unsafe {
        if let (Some(ref_key), Some(ref_avk_key)) = (keys.as_ref(), avk_key.as_mut()) {
            let pks = slice::from_raw_parts(ref_key, nr_signers)
                .iter()
                .map(|p| **p)
                .collect::<Vec<_>>();
            return match Registration::new(&pks) {
                Ok(k) => {
                    *ref_avk_key = Box::into_raw(Box::new(k));
                    0
                }
                Err(_) => -1,
            };
        }
        NULLPOINTERERR
    }
}
/// Performs the key registration. Note there exists the possibility of registering a single key in more
/// than one position. Returns
/// * 0 upon success
/// * -1 if one of the keys included in the registration have an invalid proof of possession.
Performs the key registration. Note there exists the possibility of registering a single key in more
than one position. Returns
0 upon success
-1 if one of the keys included in the registration have an invalid proof of possession.
Performs the key registration . Note there exists the possibility of registering a single key in more than one position . Returns 0 upon success - 1 if one of the keys included in the registration have an invalid proof of possession .
pub extern "C" fn avk_key_registration(
    keys: *const PublicKeyPoPPtr,
    nr_signers: usize,
    avk_key: *mut RegistrationPtr,
) -> i64 {
    unsafe {
        if let (Some(ref_key), Some(ref_avk_key)) = (keys.as_ref(), avk_key.as_mut()) {
            let pks = slice::from_raw_parts(ref_key, nr_signers)
                .iter()
                .map(|p| **p)
                .collect::<Vec<_>>();
            return match Registration::new(&pks) {
                Ok(k) => {
                    *ref_avk_key = Box::into_raw(Box::new(k));
                    0
                }
                Err(_) => -1,
            };
        }
        NULLPOINTERERR
    }
}
pub extern " " fn avk_key_registration ( keys : * const PublicKeyPoPPtr , nr_signers : usize , avk_key : * mut RegistrationPtr , ) -> i64 { unsafe { if let ( Some ( ref_key ) , Some ( ref_avk_key ) ) = ( keys . as_ref ( ) , avk_key . as_mut ( ) ) { let pks = slice :: from_raw_parts ( ref_key , nr_signers ) . iter ( ) . map ( | p | * * p ) . collect :: < Vec < _ > > ( ) ; return match Registration :: new ( & pks ) { Ok ( k ) => { * ref_avk_key = Box :: into_raw ( Box :: new ( k ) ) ; 0 } Err ( _ ) => - 1 , } ; } NULLPOINTERERR } }
Performs the key registration.
Performs the key registration .
keys
*const PublicKeyPoPPtr
nr_signers
usize
avk_key
*mut RegistrationPtr