pub fn new_with_min_size(threshold: usize,
                             secret_count: usize,
                             share_count: usize,
                             min_size: usize)
                             -> PackedSecretSharing<F> {

        let m = threshold + secret_count + 1;
        let n = share_count + 1;
        assert!(is_power_of(m, 2));
        assert!(is_power_of(n, 3));
        assert!(min_size >= share_count + secret_count + threshold + 1);

        let (prime, omega_secrets, omega_shares) = generate_parameters(min_size, m, n);
        
        let field = F::new((prime as u32).into());
        PackedSecretSharing {
            threshold: threshold,
            share_count: share_count,
            secret_count: secret_count,
            omega_secrets: field.encode(omega_secrets as u32),
            omega_shares: field.encode(omega_shares as u32),
            field: field,
        }
    }
/// Find suitable parameters with a prime field of at least the specified size.
Find suitable parameters with a prime field of at least the specified size.
Find suitable parameters with a prime field of at least the specified size .
pub fn new_with_min_size(threshold: usize,
                             secret_count: usize,
                             share_count: usize,
                             min_size: usize)
                             -> PackedSecretSharing<F> {
        let m = threshold + secret_count + 1;
        let n = share_count + 1;
        assert!(is_power_of(m, 2));
        assert!(is_power_of(n, 3));
        assert!(min_size >= share_count + secret_count + threshold + 1);
        let (prime, omega_secrets, omega_shares) = generate_parameters(min_size, m, n);
        let field = F::new((prime as u32).into());
        PackedSecretSharing {
            threshold: threshold,
            share_count: share_count,
            secret_count: secret_count,
            omega_secrets: field.encode(omega_secrets as u32),
            omega_shares: field.encode(omega_shares as u32),
            field: field,
        }
    }
pub fn new_with_min_size ( threshold : usize , secret_count : usize , share_count : usize , min_size : usize ) -> PackedSecretSharing < F > { let m = threshold + secret_count + 1 ; let n = share_count + 1 ; assert ! ( is_power_of ( m 2 ) ) ; assert ! ( is_power_of ( n 3 ) ) ; assert ! ( min_size share_count secret_count threshold 1 ) ; let ( prime , omega_secrets , omega_shares ) = generate_parameters ( min_size , m , n ) ; let field = F :: new ( ( prime as u32 ) . into ( ) ) ; PackedSecretSharing { threshold : threshold , share_count : share_count , secret_count : secret_count , omega_secrets : field . encode ( omega_secrets as u32 ) , omega_shares : field . encode ( omega_shares as u32 ) , field : field , } }
Find suitable parameters with a prime field of at least the specified size.
Find suitable parameters with a prime field of at least the specified size .
threshold
usize
secret_count
usize
share_count
usize
min_size
usize