From 2066102afabeb1e3adb74cad31aa8e13c775a14f Mon Sep 17 00:00:00 2001 From: Eyal Kalderon Date: Fri, 4 May 2018 17:45:58 +0800 Subject: [PATCH] Correct copy-pasted doc comment for split_secret_rng --- src/sss/mod.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/sss/mod.rs b/src/sss/mod.rs index 20505ea..1cb8f3a 100644 --- a/src/sss/mod.rs +++ b/src/sss/mod.rs @@ -49,12 +49,26 @@ pub fn split_secret(k: u8, n: u8, secret: &[u8], sign_shares: bool) -> Result ChaChaRng { +/// # let mut rng = ChaChaRng::new_unseeded(); +/// # rng.set_counter(42, 42); +/// # rng +/// # } +/// # +/// # fn main() { +/// use rusty_secrets::sss::split_secret_rng; /// /// let secret = "These programs were never about terrorism: they’re about economic spying, \ /// social control, and diplomatic manipulation. They’re about power."; /// -/// match split_secret(7, 10, &secret.as_bytes(), true) { +/// let mut rng = some_custom_rng(); +/// +/// match split_secret_rng(&mut rng, 7, 10, &secret.as_bytes(), true) { /// Ok(shares) => { /// // Do something with the shares /// }, @@ -62,6 +76,7 @@ pub fn split_secret(k: u8, n: u8, secret: &[u8], sign_shares: bool) -> Result( rng: &mut R,