NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
key-container.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_SECURITY_PIB_KEY_CONTAINER_HPP
23
#define NDN_SECURITY_PIB_KEY_CONTAINER_HPP
24
25
#include "
key.hpp
"
26
27
#include <set>
28
#include <unordered_map>
29
30
namespace
ndn
{
31
namespace
security
{
32
namespace
pib {
33
34
class
PibImpl;
35
36
namespace
detail {
37
class
KeyImpl;
38
class
IdentityImpl;
39
}
// namespace detail
40
47
class
KeyContainer
: noncopyable
48
{
49
public
:
50
class
const_iterator
:
public
std::iterator
<std::forward_iterator_tag, const Key>
51
{
52
public
:
53
const_iterator
();
54
55
Key
56
operator*();
57
58
const_iterator
&
59
operator++();
60
61
const_iterator
62
operator++(
int
);
63
64
bool
65
operator==
(
const
const_iterator
& other);
66
67
bool
68
operator!=
(
const
const_iterator
& other);
69
70
private
:
71
const_iterator
(std::set<Name>::const_iterator it,
const
KeyContainer
& container);
72
73
private
:
74
std::set<Name>::const_iterator m_it;
75
const
KeyContainer
* m_container;
76
77
friend
class
KeyContainer
;
78
};
79
80
typedef
const_iterator
iterator
;
81
82
public
:
83
const_iterator
84
begin()
const
;
85
86
const_iterator
87
end()
const
;
88
89
const_iterator
90
find(
const
Name
& keyName)
const
;
91
92
size_t
93
size()
const
;
94
101
Key
102
add(
const
uint8_t* key,
size_t
keyLen,
const
Name
& keyName);
103
108
void
109
remove
(
const
Name
& keyName);
110
116
Key
117
get
(
const
Name
& keyName)
const
;
118
124
bool
125
isConsistent()
const
;
126
127
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
:
132
KeyContainer
(
const
Name
& identity, shared_ptr<PibImpl> pibImpl);
133
134
const
std::set<Name>&
135
getKeyNames
()
const
136
{
137
return
m_keyNames;
138
}
139
140
const
std::unordered_map<Name, shared_ptr<detail::KeyImpl>>&
141
getLoadedKeys
()
const
142
{
143
return
m_keys;
144
}
145
146
private
:
147
Name
m_identity;
148
std::set<Name> m_keyNames;
150
mutable
std::unordered_map<Name, shared_ptr<detail::KeyImpl>> m_keys;
151
152
shared_ptr<PibImpl> m_pib;
153
154
friend
class
detail::IdentityImpl
;
155
};
156
157
}
// namespace pib
158
159
using
pib::KeyContainer
;
160
161
}
// namespace security
162
}
// namespace ndn
163
164
#endif // NDN_SECURITY_PIB_KEY_CONTAINER_HPP
ndn::security::pib::detail::IdentityImpl
Backend instance of Identity.
Definition:
identity-impl.hpp:43
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::pib::operator==
bool operator==(const Identity &lhs, const Identity &rhs)
Definition:
identity.hpp:162
key.hpp
ndn::security::pib::KeyContainer::iterator
const_iterator iterator
Definition:
key-container.hpp:80
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Definition:
common.hpp:43
websocketpp::transport::asio::socket::error::security
Catch-all error for security policy errors that don't fit in other categories.
Definition:
base.hpp:79
nfd::cs::iterator
Table::const_iterator iterator
Definition:
cs-internal.hpp:41
ndn::security::pib::KeyContainer::const_iterator
Definition:
key-container.hpp:50
ndn::security::pib::KeyContainer
Container of keys of an identity.
Definition:
key-container.hpp:47
ndn::security::pib::KeyContainer::getLoadedKeys
const std::unordered_map< Name, shared_ptr< detail::KeyImpl > > & getLoadedKeys() const
Definition:
key-container.hpp:141
ndn::security::pib::Key
A frontend handle of a key instance.
Definition:
key.hpp:49
ndn::Name
Represents an absolute name.
Definition:
name.hpp:42
ndn::security::pib::KeyContainer::getKeyNames
const std::set< Name > & getKeyNames() const
Definition:
key-container.hpp:135
ndn::security::pib::operator!=
bool operator!=(const Identity &lhs, const Identity &rhs)
Definition:
identity.cpp:101
ndnSIM
ndn-cxx
src
security
pib
key-container.hpp
Generated on Thu Nov 2 2017 03:30:28 for ndnSIM by
1.8.11