#include <SecretSharer.h>
|
static void | split (std::istream *data, int parts, int threshold, std::vector< std::ostream *> *secrets) throw (SecretSharerException, RandomException) |
|
static void | join (std::vector< std::istream * > *secrets, unsigned int parts, unsigned int threshold, std::ostream *secret) throw (SecretSharerException) |
|
Sharing and recovering secrets with only static functions.
◆ join()
void SecretSharer::join |
( |
std::vector< std::istream * > * |
secrets, |
|
|
unsigned int |
parts, |
|
|
unsigned int |
threshold, |
|
|
std::ostream * |
secret |
|
) |
| |
throw | ( | SecretSharerException |
| ) | | |
|
static |
recover the secret from pieces
- Parameters
-
secrets | vector of input stream that will be read to recover the secret |
parts | number of parts that the secret was split |
threshold | value of threshold set on split |
secret | output stream that will be wrote the secret |
- Exceptions
-
InvalidNumberOfPartsException | |
InvalidNumberOfThresholdException | |
SecretSharerInternalErrorException | |
◆ split()
share a secret in parts and threshold parts is necessary to recover
- Parameters
-
data | input of data, the secret |
parts | number of parts that the secret will be shared |
threshold | minimal number of parts to recover the secret |
secrets | vector of ostream that will be wrote the pieces of the parts |
- Exceptions
-
InvalidNumberOfPartsException | |
InvalidNumberOfThresholdException | |
InvalidRandomDataSourceException | |
SecretSharerInternalErrorException | |
The documentation for this class was generated from the following files: