pub struct SecretSharing {
pub threshold: usize,
pub n_shares: usize,
pub field_size_bits: usize,
}Expand description
Secret sharing scheme (Shamir’s).
Fields§
§threshold: usize§field_size_bits: usizeImplementations§
Source§impl SecretSharing
impl SecretSharing
pub fn new(t: usize, n: usize, field_bits: usize) -> Self
pub fn shamir_2_of_3() -> Self
pub fn is_perfect(&self) -> bool
Trait Implementations§
Source§impl Clone for SecretSharing
impl Clone for SecretSharing
Source§fn clone(&self) -> SecretSharing
fn clone(&self) -> SecretSharing
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SecretSharing
impl RefUnwindSafe for SecretSharing
impl Send for SecretSharing
impl Sync for SecretSharing
impl Unpin for SecretSharing
impl UnsafeUnpin for SecretSharing
impl UnwindSafe for SecretSharing
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more