NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
identity-impl.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_SECURITY_PIB_DETAIL_IDENTITY_IMPL_HPP
23
#define NDN_SECURITY_PIB_DETAIL_IDENTITY_IMPL_HPP
24
25
#include "../key-container.hpp"
26
27
namespace
ndn
{
28
namespace
security {
29
namespace
pib {
30
31
class
PibImpl;
32
33
namespace
detail {
34
43
class
IdentityImpl
: noncopyable
44
{
45
public
:
54
IdentityImpl
(
const
Name
& identityName, shared_ptr<PibImpl> pibImpl,
bool
needInit =
false
);
55
59
const
Name
&
60
getName
()
const
61
{
62
return
m_name;
63
}
64
74
Key
75
addKey
(
const
uint8_t* key,
size_t
keyLen,
const
Name
& keyName);
76
81
void
82
removeKey
(
const
Name
& keyName);
83
90
Key
91
getKey
(
const
Name
& keyName)
const
;
92
96
const
KeyContainer
&
97
getKeys
()
const
;
98
105
const
Key
&
106
setDefaultKey
(
const
Name
& keyName);
107
114
const
Key
&
115
setDefaultKey
(
const
uint8_t* key,
size_t
keyLen,
const
Name
& keyName);
116
121
const
Key
&
122
getDefaultKey
()
const
;
123
124
private
:
125
Name
m_name;
126
127
shared_ptr<PibImpl> m_pib;
128
129
KeyContainer
m_keys;
130
mutable
bool
m_isDefaultKeyLoaded;
131
mutable
Key
m_defaultKey;
132
};
133
134
}
// namespace detail
135
}
// namespace pib
136
}
// namespace security
137
}
// namespace ndn
138
139
#endif // NDN_SECURITY_PIB_DETAIL_IDENTITY_IMPL_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::detail::IdentityImpl::setDefaultKey
const Key & setDefaultKey(const Name &keyName)
Set the key with id keyName.
Definition:
identity-impl.cpp:80
ndn::security::pib::detail::IdentityImpl::getKeys
const KeyContainer & getKeys() const
Get all keys for this Identity.
Definition:
identity-impl.cpp:73
ndn::security::pib::KeyContainer
Container of keys of an identity.
Definition:
key-container.hpp:47
ndn::security::pib::Key
A frontend handle of a key instance.
Definition:
key.hpp:49
ndn::security::pib::detail::IdentityImpl::IdentityImpl
IdentityImpl(const Name &identityName, shared_ptr< PibImpl > pibImpl, bool needInit=false)
Create an Identity with identityName.
Definition:
identity-impl.cpp:31
ndn::Name
Represents an absolute name.
Definition:
name.hpp:42
ndn::security::pib::detail::IdentityImpl::removeKey
void removeKey(const Name &keyName)
Remove a key with keyName.
Definition:
identity-impl.cpp:55
ndn::security::pib::detail::IdentityImpl::addKey
Key addKey(const uint8_t *key, size_t keyLen, const Name &keyName)
Add a key of keyLen bytes with keyName (in PKCS#8 format).
Definition:
identity-impl.cpp:48
ndn::security::pib::detail::IdentityImpl::getName
const Name & getName() const
Get the name of the identity.
Definition:
identity-impl.hpp:60
ndn::security::pib::detail::IdentityImpl::getKey
Key getKey(const Name &keyName) const
Get a key with id keyName.
Definition:
identity-impl.cpp:66
ndn::security::pib::detail::IdentityImpl::getDefaultKey
const Key & getDefaultKey() const
Get the default key for this Identity.
Definition:
identity-impl.cpp:98
ndnSIM
ndn-cxx
src
security
pib
detail
identity-impl.hpp
Generated on Sun Feb 25 2018 13:27:05 for ndnSIM by
1.8.14