NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
secured-bag.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_SECURITY_SECURED_BAG_HPP
23
#define NDN_SECURITY_SECURED_BAG_HPP
24
25
#include "../common.hpp"
26
#include "
identity-certificate.hpp
"
27
28
namespace
ndn
{
29
30
class
SecuredBag
31
{
32
public
:
33
class
Error
:
public
tlv::Error
34
{
35
public
:
36
explicit
37
Error
(
const
std::string& what)
38
: tlv::
Error
(what)
39
{
40
}
41
};
42
43
SecuredBag
();
44
45
explicit
46
SecuredBag
(
const
Block
& wire);
47
48
SecuredBag
(
const
IdentityCertificate
& cert,
49
ConstBufferPtr
key);
50
51
virtual
52
~SecuredBag
();
53
54
void
55
wireDecode
(
const
Block
& wire);
56
57
const
Block
&
58
wireEncode
()
const
;
59
60
const
IdentityCertificate
&
61
getCertificate
()
const
62
{
63
return
m_cert;
64
}
65
66
ConstBufferPtr
67
getKey
()
const
68
{
69
return
m_key;
70
}
71
72
private
:
73
IdentityCertificate
m_cert;
74
ConstBufferPtr
m_key;
75
76
mutable
Block
m_wire;
77
};
78
79
}
// namespace ndn
80
81
#endif // NDN_SECURITY_SECURED_BAG_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::SecuredBag::SecuredBag
SecuredBag()
Definition:
secured-bag.cpp:34
ndn::SecuredBag::wireDecode
void wireDecode(const Block &wire)
Definition:
secured-bag.cpp:60
ndn::SecuredBag::getKey
ConstBufferPtr getKey() const
Definition:
secured-bag.hpp:67
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::SecuredBag::Error::Error
Error(const std::string &what)
Definition:
secured-bag.hpp:37
ndn::SecuredBag::wireEncode
const Block & wireEncode() const
Definition:
secured-bag.cpp:73
identity-certificate.hpp
ndn::SecuredBag::getCertificate
const IdentityCertificate & getCertificate() const
Definition:
secured-bag.hpp:61
ndn::SecuredBag::Error
Definition:
secured-bag.hpp:33
ndn::SecuredBag
Definition:
secured-bag.hpp:30
ndn::ConstBufferPtr
shared_ptr< const Buffer > ConstBufferPtr
Definition:
buffer.hpp:33
ndn::IdentityCertificate
Definition:
identity-certificate.hpp:32
ndn::tlv::Error
represents an error in TLV encoding or decoding
Definition:
tlv.hpp:50
ndn::SecuredBag::~SecuredBag
virtual ~SecuredBag()
Definition:
secured-bag.cpp:55
ndnSIM
ndn-cxx
src
security
secured-bag.hpp
Generated on Tue Feb 23 2016 22:18:43 for ndnSIM by
1.8.11