CatapultServer  v0.5.0.1 (Elephant)
catapult::crypto::PrivateKey Class Referencefinal

Represents a private key. More...

Collaboration diagram for catapult::crypto::PrivateKey:

Public Member Functions

 PrivateKey ()=default
 Creates a private key. More...
 
 ~PrivateKey ()
 Destroys the private key. More...
 
 PrivateKey (PrivateKey &&rhs)
 Move constructor. More...
 
PrivateKeyoperator= (PrivateKey &&rhs)
 Move assignment operator. More...
 
auto begin () const
 Returns a const iterator to the beginning of the raw key. More...
 
auto end () const
 Returns a const iterator to the end of the raw key. More...
 
auto size () const
 Returns the size of the key. More...
 
auto data () const
 Returns a const pointer to the raw key. More...
 
bool operator== (const PrivateKey &rhs) const
 Returns true if this key and rhs are equal. More...
 
bool operator!= (const PrivateKey &rhs) const
 Returns true if this key and rhs are not equal. More...
 

Static Public Member Functions

static PrivateKey FromString (const std::string &str)
 Creates a private key from str. More...
 
static PrivateKey FromStringSecure (char *pRawKey, size_t keySize)
 Creates a private key from pRawKey with size keySize and securely erases pRawKey. More...
 
static PrivateKey Generate (const supplier< uint8_t > &generator)
 Generates a new private key using the specified byte generator. More...
 

Static Private Member Functions

static PrivateKey FromString (const char *const pRawKey, size_t keySize)
 

Private Attributes

Key m_key
 

Detailed Description

Represents a private key.

Constructor & Destructor Documentation

◆ PrivateKey() [1/2]

catapult::crypto::PrivateKey::PrivateKey ( )
default

Creates a private key.

◆ ~PrivateKey()

catapult::crypto::PrivateKey::~PrivateKey ( )

Destroys the private key.

Here is the call graph for this function:

◆ PrivateKey() [2/2]

catapult::crypto::PrivateKey::PrivateKey ( PrivateKey &&  rhs)

Move constructor.

Member Function Documentation

◆ begin()

auto catapult::crypto::PrivateKey::begin ( ) const
inline

Returns a const iterator to the beginning of the raw key.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data()

auto catapult::crypto::PrivateKey::data ( ) const
inline

Returns a const pointer to the raw key.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ end()

auto catapult::crypto::PrivateKey::end ( ) const
inline

Returns a const iterator to the end of the raw key.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FromString() [1/2]

PrivateKey catapult::crypto::PrivateKey::FromString ( const char *const  pRawKey,
size_t  keySize 
)
staticprivate
Here is the call graph for this function:

◆ FromString() [2/2]

PrivateKey catapult::crypto::PrivateKey::FromString ( const std::string &  str)
static

Creates a private key from str.

Here is the caller graph for this function:

◆ FromStringSecure()

PrivateKey catapult::crypto::PrivateKey::FromStringSecure ( char *  pRawKey,
size_t  keySize 
)
static

Creates a private key from pRawKey with size keySize and securely erases pRawKey.

Here is the call graph for this function:

◆ Generate()

PrivateKey catapult::crypto::PrivateKey::Generate ( const supplier< uint8_t > &  generator)
static

Generates a new private key using the specified byte generator.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

bool catapult::crypto::PrivateKey::operator!= ( const PrivateKey rhs) const

Returns true if this key and rhs are not equal.

◆ operator=()

PrivateKey & catapult::crypto::PrivateKey::operator= ( PrivateKey &&  rhs)

Move assignment operator.

◆ operator==()

bool catapult::crypto::PrivateKey::operator== ( const PrivateKey rhs) const

Returns true if this key and rhs are equal.

◆ size()

auto catapult::crypto::PrivateKey::size ( ) const
inline

Returns the size of the key.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_key

Key catapult::crypto::PrivateKey::m_key
private

The documentation for this class was generated from the following files: