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);
94 computeDigest()
const;
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;
126 #ifdef NDN_CXX_KEEP_SECURITY_V1_ALIASES 129 #endif // NDN_CXX_KEEP_SECURITY_V1_ALIASES 133 #endif // NDN_SECURITY_V1_PUBLIC_KEY_HPP bool operator==(const PublicKey &key) const
Copyright (c) 2013-2017 Regents of the University of California.
Copyright (c) 2013-2017 Regents of the University of California.
std::ostream & operator<<(std::ostream &os, const Data &data)
Represents a TLV element of NDN packet format.
KeyType getKeyType() const
Error(const std::string &what)
Class representing a general-use automatically managed/resized buffer.
bool operator!=(const PublicKey &key) const