NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
safe-bag.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
23
#ifndef NDN_CXX_SECURITY_SAFE_BAG_HPP
24
#define NDN_CXX_SECURITY_SAFE_BAG_HPP
25
26
#include "../common.hpp"
27
#include "../data.hpp"
28
#include "../encoding/buffer.hpp"
29
#include "../encoding/encoder.hpp"
30
#include "../encoding/encoding-buffer.hpp"
31
#include "
security-common.hpp
"
32
33
namespace
ndn
{
34
namespace
security
{
35
38
class
SafeBag
39
{
40
public
:
44
SafeBag
();
45
49
explicit
50
SafeBag
(
const
Block
& wire);
51
58
SafeBag
(
const
Data
& certificate,
59
const
Buffer
& encryptedKeyBag);
60
68
SafeBag
(
const
Data
& certificate,
69
const
uint8_t* encryptedKey,
70
size_t
encryptedKeyLen);
71
72
public
:
76
template
<encoding::Tag TAG>
77
size_t
78
wireEncode
(
EncodingImpl<TAG>
& encoder)
const
;
79
83
const
Block
&
84
wireEncode
()
const
;
85
89
void
90
wireDecode
(
const
Block
& wire);
91
92
public
:
96
const
Data
&
97
getCertificate
()
const
98
{
99
return
m_certificate;
100
}
101
105
const
Buffer
&
106
getEncryptedKeyBag
()
const
107
{
108
return
m_encryptedKeyBag;
109
}
110
111
private
:
112
Data
m_certificate;
113
Buffer
m_encryptedKeyBag;
114
115
mutable
Block
m_wire;
116
};
117
118
}
// namespace security
119
}
// namespace ndn
120
121
#endif // NDN_CXX_SECURITY_SAFE_BAG_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::SafeBag::SafeBag
SafeBag()
Create a new empty SafeBag object.
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::security::SafeBag::getEncryptedKeyBag
const Buffer & getEncryptedKeyBag() const
Get the private key in PKCS#8 from safe bag.
Definition:
safe-bag.hpp:106
ndn::security::SafeBag::getCertificate
const Data & getCertificate() const
Get the certificate data packet from safe bag.
Definition:
safe-bag.hpp:97
ndn::security::SafeBag::wireDecode
void wireDecode(const Block &wire)
Decode the input from wire format.
Definition:
safe-bag.cpp:97
ndn::encoding::EncodingImpl
Definition:
encoding-buffer-fwd.hpp:45
ndn::security::SafeBag
a secured container for sensitive information(certificate, private key)
Definition:
safe-bag.hpp:38
ndn::security::SafeBag::wireEncode
const Block & wireEncode() const
Encode to a wire format.
Definition:
safe-bag.cpp:84
ndn::Data
represents a Data packet
Definition:
data.hpp:37
ndn::Buffer
Class representing a general-use automatically managed/resized buffer.
Definition:
buffer.hpp:44
security
security-common.hpp
ndnSIM
ndn-cxx
src
security
safe-bag.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13