PublicKey Class Reference

PublicKey indicates an entities public RSA key. More...

#include <publickey.h>

List of all members.


Public Member Functions

 PublicKey ()
 Dummy default constructor.
 PublicKey (const std::string &key)
 Construct from string data.
uint8_t * c_str () const
size_t size () const
 operator bool () const
 implicit conversion to bool checks for contained data
void clear ()
 Clears the contents of this key.

Private Attributes

boost::shared_array< uint8_t > m_key
uint8_t m_keyLen

Friends

bool operator! (const PublicKey &p)
 inequality operator to bool
bool operator< (const PublicKey &x, const PublicKey &y)
bool operator== (const PublicKey &x, const PublicKey &y)
bool operator!= (const PublicKey &x, const PublicKey &y)

Detailed Description

PublicKey indicates an entities public RSA key.

PublicKey objects share the underlying data and are thus inexpensive to copy. PublicKey object's contents can never be modified.

Definition at line 29 of file publickey.h.


Constructor & Destructor Documentation

PublicKey::PublicKey  )  [inline]
 

Dummy default constructor.

Definition at line 32 of file publickey.h.

References m_keyLen.

PublicKey::PublicKey const std::string &  key  )  [inline]
 

Construct from string data.

Definition at line 35 of file publickey.h.

References m_key, m_keyLen, and size().


Member Function Documentation

uint8_t* PublicKey::c_str  )  const [inline]
 

Definition at line 40 of file publickey.h.

References m_key.

Referenced by CreditsDb::createSignature(), and CreditsDb::verifySignature().

size_t PublicKey::size  )  const [inline]
 

Definition at line 41 of file publickey.h.

References m_keyLen.

Referenced by CreditsDb::createSignature(), PublicKey(), and CreditsDb::verifySignature().

PublicKey::operator bool  )  const [inline]
 

implicit conversion to bool checks for contained data

Definition at line 44 of file publickey.h.

References m_key.

void PublicKey::clear  )  [inline]
 

Clears the contents of this key.

Definition at line 47 of file publickey.h.

References m_key, and m_keyLen.

Referenced by Client::onPacket().


Friends And Related Function Documentation

bool operator! const PublicKey p  )  [friend]
 

inequality operator to bool

Definition at line 50 of file publickey.h.

bool operator< const PublicKey x,
const PublicKey y
[friend]
 

Definition at line 52 of file publickey.h.

bool operator== const PublicKey x,
const PublicKey y
[friend]
 

Definition at line 61 of file publickey.h.

bool operator!= const PublicKey x,
const PublicKey y
[friend]
 

Definition at line 67 of file publickey.h.


Member Data Documentation

boost::shared_array<uint8_t> PublicKey::m_key [private]
 

Definition at line 71 of file publickey.h.

Referenced by c_str(), clear(), operator bool(), and PublicKey().

uint8_t PublicKey::m_keyLen [private]
 

Definition at line 72 of file publickey.h.

Referenced by clear(), PublicKey(), and size().


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