A generic secret class.
More...
#include <generic.hxx>
|
| | Generic (const Generic &other)=default |
| | Copy constructor.
|
| |
| | Generic (Generic &&other) noexcept=default |
| | Move constructor.
|
| |
|
virtual | ~Generic () noexcept=default |
| | Virtual destructor.
|
| |
| Generic & | operator= (const Generic &other)=default |
| | Copy assignment operator.
|
| |
| Generic & | operator= (Generic &&other) noexcept=default |
| | Move assignment operator.
|
| |
| KeyPair::Generic::PointerType | KeyPair () const noexcept |
| | Gets the keypair used for secret sharing.
|
| |
| enum Type | Type () const noexcept |
| | Gets the type of the secret share generator used for secret sharing.
|
| |
| std::optional< std::string > | Share (const std::string &peerPublicKey) const noexcept |
| | Shares the secret with a peer using their public key.
|
| |
|
|
enum Type | m_type |
| | The type of secret generator.
|
| |
|
KeyPair::Generic::PointerType | m_keypair |
| | The keypair used for secret sharing.
|
| |
◆ Generic() [1/5]
| StormByte::Crypto::Secret::Generic::Generic |
( |
const Generic & |
other | ) |
|
|
default |
Copy constructor.
- Parameters
-
| other | The other Generic secret to copy from. |
◆ Generic() [2/5]
| StormByte::Crypto::Secret::Generic::Generic |
( |
Generic && |
other | ) |
|
|
defaultnoexcept |
Move constructor.
- Parameters
-
| other | The other Generic secret to move from. |
◆ Generic() [3/5]
| StormByte::Crypto::Secret::Generic::Generic |
( |
enum Type |
type, |
|
|
KeyPair::Generic::PointerType |
keypair |
|
) |
| |
|
inlineprotected |
Constructor.
- Parameters
-
| keypair | The keypair used for secret sharing. |
◆ Generic() [4/5]
Constructor.
- Parameters
-
| keypair | The keypair used for secret sharing. |
◆ Generic() [5/5]
Constructor.
- Parameters
-
| keypair | The keypair used for secret sharing. |
◆ KeyPair()
| KeyPair::Generic::PointerType StormByte::Crypto::Secret::Generic::KeyPair |
( |
| ) |
const |
|
inlinenoexcept |
Gets the keypair used for secret sharing.
- Returns
- The keypair.
◆ operator=() [1/2]
| Generic & StormByte::Crypto::Secret::Generic::operator= |
( |
const Generic & |
other | ) |
|
|
default |
Copy assignment operator.
- Parameters
-
| other | The other Generic secret to copy from. |
- Returns
- Reference to this Generic secret.
◆ operator=() [2/2]
| Generic & StormByte::Crypto::Secret::Generic::operator= |
( |
Generic && |
other | ) |
|
|
defaultnoexcept |
Move assignment operator.
- Parameters
-
| other | The other Generic secret to move from. |
- Returns
- Reference to this Generic secret.
◆ Share()
| std::optional< std::string > StormByte::Crypto::Secret::Generic::Share |
( |
const std::string & |
peerPublicKey | ) |
const |
|
inlinenoexcept |
Shares the secret with a peer using their public key.
- Parameters
-
| peerPublicKey | The peer's public key. |
- Returns
- An optional string containing the shared secret, or std::nullopt on failure.
◆ Type()
| enum Type StormByte::Crypto::Secret::Generic::Type |
( |
| ) |
const |
|
inlinenoexcept |
Gets the type of the secret share generator used for secret sharing.
- Returns
- The type of the secret share generator.
The documentation for this class was generated from the following file:
- /home/runner/work/StormByte-Crypto/StormByte-Crypto/lib/public/StormByte/crypto/secret/generic.hxx