26 #ifndef NDN_SECURITY_V1_PUBLIC_KEY_HPP
27 #define NDN_SECURITY_V1_PUBLIC_KEY_HPP
29 #include "../../common.hpp"
31 #include "../../encoding/buffer.hpp"
32 #include "../../encoding/block.hpp"
33 #include "../security-common.hpp"
36 class BufferedTransformation;
46 class Error :
public std::runtime_error
51 :
std::runtime_error(what)
69 PublicKey(
const uint8_t* keyDerBuf,
size_t keyDerSize);
78 set(
const uint8_t* keyDerBuf,
size_t keyDerSize)
80 Buffer buf(keyDerBuf, keyDerSize);
97 encode(CryptoPP::BufferedTransformation& out)
const;
100 decode(CryptoPP::BufferedTransformation& in);
105 return m_key == key.m_key;
111 return m_key != key.m_key;
117 mutable Block m_digest;
121 operator<<(std::ostream& os,
const PublicKey& key);
126 #ifdef NDN_CXX_KEEP_SECURITY_V1_ALIASES
129 #endif // NDN_CXX_KEEP_SECURITY_V1_ALIASES
133 #endif // NDN_SECURITY_V1_PUBLIC_KEY_HPP
void set(const uint8_t *keyDerBuf, size_t keyDerSize)
bool operator==(const PublicKey &key) const
Copyright (c) 2013-2016 Regents of the University of California.
const Block & computeDigest() const
Copyright (c) 2013-2016 Regents of the University of California.
std::ostream & operator<<(std::ostream &os, const Certificate &cert)
Class representing a wire element of NDN-TLV packet format.
void encode(CryptoPP::BufferedTransformation &out) const
KeyType getKeyType() const
PublicKey()
The default constructor.
Error(const std::string &what)
void decode(CryptoPP::BufferedTransformation &in)
Class representing a general-use automatically managed/resized buffer.
bool operator!=(const PublicKey &key) const