pub fn combine<const T: usize, const N: usize>(
        shares: &[SecretKeyShare],
    ) -> Result<SecretKey, Error> {
        if T > shares.len() {
            return Err(Error::SharingLimitLessThanThreshold);
        }
        let mut ss = [Share::<SECRET_KEY_SHARE_BYTES>::default(); T];
        for i in 0..T {
            ss[i] = shares[i].0;
        }
        let scalar = Shamir::<T, N>::combine_shares::<Scalar, SECRET_KEY_SHARE_BYTES>(&ss)?;
        Ok(SecretKey(scalar))
    }
/// Reconstruct a secret from shares created from `split`
Reconstruct a secret from shares created from `split`
Reconstruct a secret from shares created from ` split `
pub fn combine<const T: usize, const N: usize>(
        shares: &[SecretKeyShare],
    ) -> Result<SecretKey, Error> {
        if T > shares.len() {
            return Err(Error::SharingLimitLessThanThreshold);
        }
        let mut ss = [Share::<SECRET_KEY_SHARE_BYTES>::default(); T];
        for i in 0..T {
            ss[i] = shares[i].0;
        }
        let scalar = Shamir::<T, N>::combine_shares::<Scalar, SECRET_KEY_SHARE_BYTES>(&ss)?;
        Ok(SecretKey(scalar))
    }
pub fn combine < const T : usize , const N : usize > ( shares : & [ SecretKeyShare ] , ) -> Result < SecretKey , Error > { if T > shares . len ( ) { return Err ( Error :: SharingLimitLessThanThreshold ) ; } let mut ss = [ Share :: < SECRET_KEY_SHARE_BYTES > :: default ( ) ; T ] ; for i in 0 .. T { ss [ i ] = shares [ i ] . 0 ; } let scalar = Shamir :: < T , N > :: combine_shares :: < Scalar , SECRET_KEY_SHARE_BYTES > ( & ss ) ? ; Ok ( SecretKey ( scalar ) ) }
Reconstruct a secret from shares created from `split`
Reconstruct a secret from shares created from ` split `
shares
&[SecretKeyShare]