Container of keys of an identity. More...
#include <key-container.hpp>


Classes | |
| class | const_iterator |
Public Types | |
| using | iterator = const_iterator |
Public Member Functions | |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_iterator | find (const Name &keyName) const |
| size_t | size () const |
| Key | add (span< const uint8_t > key, const Name &keyName) |
Add key with name keyName into the container. More... | |
| void | remove (const Name &keyName) |
Remove a key with keyName from the container. More... | |
| Key | get (const Name &keyName) const |
Get a key with keyName from the container. More... | |
| bool | isConsistent () const |
| Check if the container is consistent with the backend storage. More... | |
| const std::set< Name > & | getKeyNames () const |
| const std::unordered_map< Name, shared_ptr< detail::KeyImpl > > & | getLoadedKeys () const |
Public Attributes | |
| NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE | __pad0__: KeyContainer(const Name& identity |
| NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE shared_ptr< PibImpl > | pibImpl |
Container of keys of an identity.
The container is used to search/enumerate keys of an identity. The container can be created only by detail::IdentityImpl.
Definition at line 48 of file key-container.hpp.
Definition at line 87 of file key-container.hpp.
| KeyContainer::const_iterator ndn::security::pib::KeyContainer::begin | ( | ) | const |
Definition at line 92 of file key-container.cpp.
| KeyContainer::const_iterator ndn::security::pib::KeyContainer::end | ( | ) | const |
Definition at line 98 of file key-container.cpp.
| KeyContainer::const_iterator ndn::security::pib::KeyContainer::find | ( | const Name & | keyName | ) | const |
Definition at line 104 of file key-container.cpp.
| size_t ndn::security::pib::KeyContainer::size | ( | ) | const |
Definition at line 110 of file key-container.cpp.
Add key with name keyName into the container.
If a key with the same name already exists, it will be overwritten.
| std::invalid_argument | keyName does not match the identity |
Definition at line 116 of file key-container.cpp.
References ndn::security::v2::extractIdentityFromKeyName(), NDN_THROW, and ndn::Name::toUri().
Referenced by ndn::security::pib::detail::IdentityImpl::addKey().
| void ndn::security::pib::KeyContainer::remove | ( | const Name & | keyName | ) |
Remove a key with keyName from the container.
| std::invalid_argument | keyName does not match the identity |
Definition at line 129 of file key-container.cpp.
References ndn::security::v2::extractIdentityFromKeyName(), NDN_THROW, and ndn::Name::toUri().
Referenced by ndn::security::pib::detail::IdentityImpl::removeKey().
Get a key with keyName from the container.
| std::invalid_argument | keyName does not match the identity |
| Pib::Error | the key does not exist |
Definition at line 142 of file key-container.cpp.
References ndn::security::v2::extractIdentityFromKeyName(), NDN_THROW, and ndn::Name::toUri().
Referenced by ndn::security::pib::detail::IdentityImpl::getDefaultKey(), ndn::security::pib::detail::IdentityImpl::getKey(), ndn::security::pib::KeyContainer::const_iterator::operator*(), and ndn::security::pib::detail::IdentityImpl::setDefaultKey().
| bool ndn::security::pib::KeyContainer::isConsistent | ( | ) | const |
Check if the container is consistent with the backend storage.
Definition at line 164 of file key-container.cpp.
Referenced by ndn::security::pib::detail::IdentityImpl::addKey(), ndn::security::pib::detail::IdentityImpl::getDefaultKey(), ndn::security::pib::detail::IdentityImpl::getKey(), ndn::security::pib::detail::IdentityImpl::getKeys(), ndn::security::pib::detail::IdentityImpl::removeKey(), and ndn::security::pib::detail::IdentityImpl::setDefaultKey().
|
inline |
Definition at line 143 of file key-container.hpp.
|
inline |
Definition at line 149 of file key-container.hpp.
| NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::security::pib::KeyContainer::__pad0__ |
Definition at line 140 of file key-container.hpp.
| NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE shared_ptr<PibImpl> ndn::security::pib::KeyContainer::pibImpl |
Definition at line 140 of file key-container.hpp.
Referenced by ndn::security::pib::KeyContainer::const_iterator::operator!=().