ndn::security::v1::PublicKey Class Reference

#include <public-key.hpp>

Classes

class  Error
 

Public Member Functions

 PublicKey ()
 The default constructor. More...
 
 PublicKey (const uint8_t *keyDerBuf, size_t keyDerSize)
 Create a new PublicKey from keyDerBuf in DER buffer. More...
 
const BlockcomputeDigest () const
 
void decode (CryptoPP::BufferedTransformation &in)
 
void encode (CryptoPP::BufferedTransformation &out) const
 
const Bufferget () const
 
KeyType getKeyType () const
 
bool operator!= (const PublicKey &key) const
 
bool operator== (const PublicKey &key) const
 
void set (const uint8_t *keyDerBuf, size_t keyDerSize)
 

Detailed Description

Definition at line 43 of file v1/public-key.hpp.

Constructor & Destructor Documentation

ndn::security::v1::PublicKey::PublicKey ( )

The default constructor.

Definition at line 35 of file v1/public-key.cpp.

ndn::security::v1::PublicKey::PublicKey ( const uint8_t *  keyDerBuf,
size_t  keyDerSize 
)

Create a new PublicKey from keyDerBuf in DER buffer.

Parameters
keyDerBufThe pointer to the first byte of buffer containing DER of public key
keyDerSizeSize of the buffer
Exceptions
PublicKey::ErrorIf DER in buffer cannot be decoded

Definition at line 40 of file v1/public-key.cpp.

Member Function Documentation

const Block & ndn::security::v1::PublicKey::computeDigest ( ) const
Returns
a KeyDigest block that matches this public key

Definition at line 48 of file v1/public-key.cpp.

void ndn::security::v1::PublicKey::decode ( CryptoPP::BufferedTransformation &  in)

Definition at line 74 of file v1/public-key.cpp.

void ndn::security::v1::PublicKey::encode ( CryptoPP::BufferedTransformation &  out) const

Definition at line 64 of file v1/public-key.cpp.

const Buffer& ndn::security::v1::PublicKey::get ( ) const
inline

Definition at line 72 of file v1/public-key.hpp.

KeyType ndn::security::v1::PublicKey::getKeyType ( ) const
inline

Definition at line 85 of file v1/public-key.hpp.

bool ndn::security::v1::PublicKey::operator!= ( const PublicKey key) const
inline

Definition at line 109 of file v1/public-key.hpp.

bool ndn::security::v1::PublicKey::operator== ( const PublicKey key) const
inline

Definition at line 103 of file v1/public-key.hpp.

void ndn::security::v1::PublicKey::set ( const uint8_t *  keyDerBuf,
size_t  keyDerSize 
)
inline

Definition at line 78 of file v1/public-key.hpp.