[−][src]Struct sss_rs::sharer::Sharer
Creates shares from a given secret. Shares to any suitable destination that implements Write and has conveinence functions for files. To instantiate, the builder should be used.
Methods
impl Sharer
[src]
pub fn builder(secret: Secret) -> SharerBuilder
[src]
Constructs the builder with defualt values. See the builder documentation for the default values.
pub fn share(
&self,
dests: &mut Vec<Box<dyn Write>>
) -> Result<(), Box<dyn Error>>
[src]
&self,
dests: &mut Vec<Box<dyn Write>>
) -> Result<(), Box<dyn Error>>
Shares all the shares to individual writeable destinations. This iterates through the secret and calculates the share lists in chunks and writes the shares to their respective destinations
pub fn share_to_files(
&self,
dir: &str,
stem: &str
) -> Result<(), Box<dyn Error>>
[src]
&self,
dir: &str,
stem: &str
) -> Result<(), Box<dyn Error>>
Shares all the shares to separate files for distribution.This is a wrapper for the $share function.
Format: $dir/$stem.s<share_number> For the shares
$stem: Defines the stem of the output files, they will be $stem.s0, $stem.s1, and so on.. $dir: The directory to output the shares to.
If $dir isn't valid, the LAST invalid destination file's error is returned.
pub fn test_reconstruction_file(
&self,
dir: Option<&str>
) -> Result<(), Box<dyn Error>>
[src]
&self,
dir: Option<&str>
) -> Result<(), Box<dyn Error>>
Tests the reconstruction of the shares as outputted via the $share_to_files function. $dir: The directory to output the temporary shares. Default is the current dir
pub fn get_secret<'a>(&'a self) -> &'a Secret
[src]
Gets an immutable reference to the secret
Trait Implementations
Auto Trait Implementations
impl Send for Sharer
impl Sync for Sharer
impl Unpin for Sharer
impl UnwindSafe for Sharer
impl RefUnwindSafe for Sharer
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,