9 #ifndef NDN_SECURITY_PUBLIC_KEY_HPP
10 #define NDN_SECURITY_PUBLIC_KEY_HPP
12 #include "../common.hpp"
13 #include "../encoding/oid.hpp"
14 #include "../encoding/buffer.hpp"
22 class Error :
public std::runtime_error
27 : std::runtime_error(what)
44 PublicKey(
const uint8_t* keyDerBuf,
size_t keyDerSize);
53 set(
const uint8_t* keyDerBuf,
size_t keyDerSize)
55 Buffer buf(keyDerBuf, keyDerSize);
60 encode(CryptoPP::BufferedTransformation& out)
const;
63 decode(CryptoPP::BufferedTransformation& in);
68 return m_key == key.m_key;
74 return m_key != key.m_key;
82 operator<<(std::ostream& os,
const PublicKey& key);
86 #endif //NDN_SECURITY_PUBLIC_KEY_HPP
void encode(CryptoPP::BufferedTransformation &out) const
void set(const uint8_t *keyDerBuf, size_t keyDerSize)
PublicKey()
The default constructor.
Error(const std::string &what)
void decode(CryptoPP::BufferedTransformation &in)
bool operator!=(const PublicKey &key) const
bool operator==(const PublicKey &key) const
std::ostream & operator<<(std::ostream &os, const Data &data)
Class representing a general-use automatically managed/resized buffer.