22 #ifndef NDN_CXX_SECURITY_PIB_IDENTITY_HPP
23 #define NDN_CXX_SECURITY_PIB_IDENTITY_HPP
36 class IdentityContainer;
105 operator
bool() const noexcept;
118 addKey(span<const uint8_t> key, const
Name& keyName) const;
125 removeKey(const
Name& keyName) const;
134 setDefaultKey(const
Name& keyName) const;
142 setDefaultKey(span<const uint8_t> key, const
Name& keyName) const;
146 Identity(weak_ptr<detail::IdentityImpl> impl) noexcept;
154 shared_ptr<detail::IdentityImpl>
158 equals(const
Identity& other) const noexcept;
167 return lhs.equals(rhs);
173 return !lhs.equals(rhs);
179 return os << (
id ?
id.getName() :
"(empty)");
183 weak_ptr<detail::IdentityImpl> m_impl;
Represents an absolute name.
Container of identities of a PIB.
Frontend handle for an identity in the PIB.
Key getDefaultKey() const
Return the default key for this identity.
const KeyContainer & getKeys() const
Return all the keys of this identity.
const Name & getName() const
Return the name of the identity.
friend std::ostream & operator<<(std::ostream &os, const Identity &id)
Key getKey(const Name &keyName) const
Obtain a handle to the key with the given name.
Identity() noexcept
Default constructor.
friend bool operator!=(const Identity &lhs, const Identity &rhs)
Container of keys of an identity.
Frontend handle for a key in the PIB.
The main interface for signing key management.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE