pub fn compute_combined_encrypted_shares(
        eligibility: &[bool],
        dealings: &[Option<ToyDealing>],
    ) -> Vec<Option<SecretKey>> {
        (0..)
            .zip(eligibility)
            .map(|(new_receiver_index, eligible)| {
                if *eligible {
                    Some({
                        let new_receiver_shares: Vec<Option<SecretKey>> = dealings
                            .iter()
                            .map(|dealing_maybe| {
                                dealing_maybe.as_ref().map(|dealing| {
                                    dealing.1[new_receiver_index].expect("Missing share")
                                })
                            })
                            .collect();
                        resharing_util::interpolate_secret_key(&new_receiver_shares)
                    })
                } else {
                    None
                }
            })
            .collect()
    }
/// For each active new receiver, this provides a single encrypted secret
/// threshold key.
For each active new receiver, this provides a single encrypted secret
threshold key.
For each active new receiver this provides a single encrypted secret threshold key .
pub fn compute_combined_encrypted_shares(
        eligibility: &[bool],
        dealings: &[Option<ToyDealing>],
    ) -> Vec<Option<SecretKey>> {
        (0..)
            .zip(eligibility)
            .map(|(new_receiver_index, eligible)| {
                if *eligible {
                    Some({
                        let new_receiver_shares: Vec<Option<SecretKey>> = dealings
                            .iter()
                            .map(|dealing_maybe| {
                                dealing_maybe.as_ref().map(|dealing| {
                                    dealing.1[new_receiver_index].expect("Missing share")
                                })
                            })
                            .collect();
                        resharing_util::interpolate_secret_key(&new_receiver_shares)
                    })
                } else {
                    None
                }
            })
            .collect()
    }
pub fn compute_combined_encrypted_shares ( eligibility : & [ bool ] , dealings : & [ Option < ToyDealing > ] , ) -> Vec < Option < SecretKey > > { ( 0 .. ) . zip ( eligibility ) . map ( | ( new_receiver_index , eligible ) | { if * eligible { Some ( { let new_receiver_shares : Vec < Option < SecretKey > > = dealings . iter ( ) . map ( | dealing_maybe | { dealing_maybe . as_ref ( ) . map ( | dealing | { dealing . 1 [ new_receiver_index ] . expect ( " " ) } ) } ) . collect ( ) ; resharing_util :: interpolate_secret_key ( & new_receiver_shares ) } ) } else { None } } ) . collect ( ) }
For each active new receiver, this provides a single encrypted secret
threshold key.
For each active new receiver this provides a single encrypted secret threshold key .
eligibility
&[bool]
dealings
&[Option<ToyDealing>]
eligibility
&[bool]
dealings
&[Option<ToyDealing>]