Fabcoin Core
0.16.2
P2P Digital Currency
|
Simple class that represents a "key pair". More...
#include <Common.h>
Public Member Functions | |
KeyPair ()=default | |
Null constructor. More... | |
KeyPair (Secret const &_sec) | |
Normal constructor - populates object from the given secret key. More... | |
Secret const & | secret () const |
Public const & | pub () const |
Retrieve the public key. More... | |
Address const & | address () const |
Retrieve the associated address of the public key. More... | |
bool | operator== (KeyPair const &_c) const |
bool | operator!= (KeyPair const &_c) const |
Static Public Member Functions | |
static KeyPair | create () |
Create a new, randomly generated object. More... | |
static KeyPair | fromEncryptedSeed (bytesConstRef _seed, std::string const &_password) |
Create from an encrypted seed. More... | |
Private Attributes | |
Secret | m_secret |
Public | m_public |
Address | m_address |
Simple class that represents a "key pair".
All of the data of the class can be regenerated from the secret key (m_secret) alone. Actually stores a tuplet of secret, public and address (the right 160-bits of the public).
|
default |
Null constructor.
KeyPair::KeyPair | ( | Secret const & | _sec | ) |
Normal constructor - populates object from the given secret key.
If the secret key is invalid the constructor succeeds, but public key and address stay "null".
Definition at line 298 of file Common.cpp.
|
inline |
|
static |
Create a new, randomly generated object.
Definition at line 307 of file Common.cpp.
|
static |
Create from an encrypted seed.
Definition at line 317 of file Common.cpp.
|
inline |
|
inline |
|
inline |
|
inline |