From 204466342aa8a4ff60bd9faf9f77563fd61c2a4e Mon Sep 17 00:00:00 2001 From: pawanjay176 Date: Mon, 13 May 2019 16:36:51 +0530 Subject: [PATCH] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 086968c..a3ca61e 100644 --- a/README.md +++ b/README.md @@ -10,20 +10,21 @@ Run example with ```rust extern crate secretsharing; -use secretsharing::ss::{reconstruct_secret, Charset, SecretSharing}; +use secretsharing::ss::{Charset, SecretSharing}; fn main() { let threshold = 3; let total_shares = 5; let secret = "HelloWorld123"; let mut ss = SecretSharing::new( - threshold, // Minimum shares required for reconstruction. - total_shares, // Total shares. - Charset::Alphanumeric // Charset of secret. + threshold, // Minimum shares required for reconstruction. + total_shares, // Total shares. + Charset::Alphanumeric, // Charset of secret. ); let shares = ss.generate_shares(secret).unwrap(); - let reconstructed_secret = reconstruct_secret(&shares[0..3].to_vec(), ss).unwrap(); + let reconstructed_secret = ss.reconstruct_secret(&shares[0..3].to_vec()).unwrap(); assert_eq!(reconstructed_secret, secret); } + ```