22 #ifndef NDN_CXX_SECURITY_PIB_KEY_CONTAINER_HPP
23 #define NDN_CXX_SECURITY_PIB_KEY_CONTAINER_HPP
29 #include <unordered_map>
53 using NameSet = std::set<Name>;
98 NameSet::const_iterator m_it;
110 return {m_keyNames.begin(), *
this};
128 return m_keyNames.empty();
137 return m_keyNames.size();
148 add(span<const uint8_t> key,
const Name& keyName);
163 get(
const Name& keyName)
const;
181 mutable std::unordered_map<Name, shared_ptr<detail::KeyImpl>> m_keys;
185 const Name m_identity;
186 const shared_ptr<PibImpl> m_pib;
188 friend detail::IdentityImpl;
#define NDN_CXX_NODISCARD
Represents an absolute name.
std::forward_iterator_tag iterator_category
const_iterator operator++(int)
std::ptrdiff_t difference_type
bool operator!=(const const_iterator &other) const
bool operator==(const const_iterator &other) const
const_iterator & operator++()
Container of keys of an identity.
const_iterator end() const noexcept
size_t size() const noexcept
Return the number of keys in the container.
Key add(span< const uint8_t > key, const Name &keyName)
Add key with name keyName into the container.
Key get(const Name &keyName) const
Return a key by name.
const_iterator find(const Name &keyName) const
bool isConsistent() const
Check if the container is consistent with the backend storage.
const_iterator begin() const noexcept
bool empty() const noexcept
Check whether the container is empty.
void remove(const Name &keyName)
Remove a key with keyName from the container.
Frontend handle for a key in the PIB.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE