NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
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 "
v1/identity-certificate.hpp
"
27
28
namespace
ndn
{
29
namespace
security
{
30
31
class
SecuredBag
32
{
33
public
:
34
class
Error
:
public
tlv::Error
35
{
36
public
:
37
explicit
38
Error
(
const
std::string& what)
39
: tlv::
Error
(what)
40
{
41
}
42
};
43
44
SecuredBag
();
45
46
explicit
47
SecuredBag
(
const
Block
& wire);
48
49
SecuredBag
(
const
v1::IdentityCertificate
& cert,
50
ConstBufferPtr
key);
51
52
virtual
53
~SecuredBag
();
54
55
void
56
wireDecode
(
const
Block
& wire);
57
58
const
Block
&
59
wireEncode
()
const
;
60
61
const
v1::IdentityCertificate
&
62
getCertificate
()
const
63
{
64
return
m_cert;
65
}
66
67
ConstBufferPtr
68
getKey
()
const
69
{
70
return
m_key;
71
}
72
73
private
:
74
v1::IdentityCertificate
m_cert;
75
ConstBufferPtr
m_key;
76
77
mutable
Block
m_wire;
78
};
79
80
}
// namespace security
81
82
using
security::SecuredBag
;
83
84
}
// namespace ndn
85
86
#endif // NDN_SECURITY_SECURED_BAG_HPP
ndn::security::v1::IdentityCertificate
Definition:
identity-certificate.hpp:34
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::SecuredBag::SecuredBag
SecuredBag()
Definition:
secured-bag.cpp:34
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::security::SecuredBag::wireEncode
const Block & wireEncode() const
Definition:
secured-bag.cpp:73
ndn::security::SecuredBag
Definition:
secured-bag.hpp:31
ndn::security::SecuredBag::Error::Error
Error(const std::string &what)
Definition:
secured-bag.hpp:38
ndn::security::SecuredBag::~SecuredBag
virtual ~SecuredBag()
Definition:
secured-bag.cpp:55
ndn::security::SecuredBag::wireDecode
void wireDecode(const Block &wire)
Definition:
secured-bag.cpp:60
ndn::security::SecuredBag::Error
Definition:
secured-bag.hpp:34
ndn::ConstBufferPtr
shared_ptr< const Buffer > ConstBufferPtr
Definition:
buffer.hpp:33
ndn::security::SecuredBag::getKey
ConstBufferPtr getKey() const
Definition:
secured-bag.hpp:68
ndn::security::SecuredBag::getCertificate
const v1::IdentityCertificate & getCertificate() const
Definition:
secured-bag.hpp:62
security
ndn::tlv::Error
represents an error in TLV encoding or decoding
Definition:
tlv.hpp:50
identity-certificate.hpp
ndnSIM
ndn-cxx
src
security
secured-bag.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13