Container of keys of an identity. More...
#include <ndn-cxx/security/pib/key-container.hpp>
Classes | |
class | const_iterator |
Public Types | |
using | iterator = const_iterator |
Public Member Functions | |
Key | add (span< const uint8_t > key, const Name &keyName) |
Add key with name keyName into the container. More... | |
const_iterator | begin () const noexcept |
bool | empty () const noexcept |
Check whether the container is empty. More... | |
const_iterator | end () const noexcept |
const_iterator | find (const Name &keyName) const |
Key | get (const Name &keyName) const |
Return a key by name. More... | |
bool | isConsistent () const |
Check if the container is consistent with the backend storage. More... | |
void | remove (const Name &keyName) |
Remove a key with keyName from the container. More... | |
size_t | size () const noexcept |
Return the number of keys in the container. More... | |
Container of keys of an identity.
The container is used to search/enumerate the keys of an identity. It can be created only by the IdentityImpl private class.
Definition at line 50 of file key-container.hpp.
Definition at line 104 of file key-container.hpp.
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 75 of file key-container.cpp.
|
inlinenoexcept |
Definition at line 108 of file key-container.hpp.
|
inlinenoexcept |
Check whether the container is empty.
Definition at line 126 of file key-container.hpp.
|
inlinenoexcept |
Definition at line 114 of file key-container.hpp.
KeyContainer::const_iterator ndn::security::pib::KeyContainer::find | ( | const Name & | keyName | ) | const |
Definition at line 69 of file key-container.cpp.
Return a key by name.
Pib::Error | The key does not exist. |
std::invalid_argument | keyName does not match the identity. |
Definition at line 111 of file key-container.cpp.
bool ndn::security::pib::KeyContainer::isConsistent | ( | ) | const |
Check if the container is consistent with the backend storage.
Definition at line 133 of file key-container.cpp.
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 92 of file key-container.cpp.
|
inlinenoexcept |
Return the number of keys in the container.
Definition at line 135 of file key-container.hpp.