23 #include "ndn-cxx/security/pib/impl/identity-impl.hpp"
32 : m_impl(std::move(impl))
39 return lock()->getName();
43 Identity::addKey(span<const uint8_t> key,
const Name& keyName)
const
45 return lock()->addKey(key, keyName);
49 Identity::removeKey(
const Name& keyName)
const
51 lock()->removeKey(keyName);
57 return lock()->getKey(keyName);
63 return lock()->getKeys();
67 Identity::setDefaultKey(
const Name& keyName)
const
69 return lock()->setDefaultKey(keyName);
73 Identity::setDefaultKey(span<const uint8_t> key,
const Name& keyName)
const
75 return lock()->setDefaultKey(key, keyName);
81 return lock()->getDefaultKey();
84 Identity::operator bool()
const
86 return !m_impl.expired();
89 shared_ptr<detail::IdentityImpl>
90 Identity::lock()
const
92 auto impl = m_impl.lock();
95 NDN_THROW(std::domain_error(
"Invalid Identity instance"));
103 return lhs.m_impl.owner_before(rhs.m_impl) || rhs.m_impl.owner_before(lhs.m_impl);
Represents an absolute name.
A frontend handle of an Identity.
const KeyContainer & getKeys() const
Get all keys for this identity.
const Key & getDefaultKey() const
Get the default key for this Identity.
const Name & getName() const
Get the name of the identity.
Identity()
Default Constructor.
Key getKey(const Name &keyName) const
Get a key with id keyName.
Container of keys of an identity.
A frontend handle of a key instance.
bool operator!=(const Identity &lhs, const Identity &rhs)
std::ostream & operator<<(std::ostream &os, const Identity &id)