Struct shamir::SecretData [] [src]

pub struct SecretData {
    pub secret_data: Option<String>,
    pub coefficients: Vec<Vec<u8>>,
}

Fields

secret_data: Option<String> coefficients: Vec<Vec<u8>>

Methods

impl SecretData
[src]

fn with_secret(secret: &str, threshold: u8) -> SecretData

fn get_share(&self, id: u8) -> Vec<u8>

fn is_valid_share(&self, share: &Vec<u8>) -> bool

fn recover_secret(threshold: u8, shares: Vec<Vec<u8>>) -> Option<String>