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
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
i
k
l
n
p
r
s
u
w
+
Related Functions
b
c
d
e
f
g
i
k
l
m
n
o
p
s
v
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
g
k
l
n
p
r
s
Typedefs
+
Macros
b
d
e
f
i
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
certificate-extension.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
25
#include "
certificate-extension.hpp
"
26
#include "
cryptopp.hpp
"
27
28
namespace
ndn
{
29
namespace
security
{
30
namespace
v1 {
31
32
void
33
CertificateExtension::encode
(CryptoPP::BufferedTransformation& out)
const
34
{
35
using namespace
CryptoPP
;
36
37
// Extension ::= SEQUENCE {
38
// extnID OBJECT IDENTIFIER,
39
// critical BOOLEAN DEFAULT FALSE,
40
// extnValue OCTET STRING }
41
42
DERSequenceEncoder extension(out);
43
{
44
m_extensionId
.
encode
(extension);
45
DEREncodeUnsigned(extension,
m_isCritical
, BOOLEAN);
46
DEREncodeOctetString(extension,
m_extensionValue
.
buf
(),
m_extensionValue
.size());
47
}
48
extension.MessageEnd();
49
}
50
51
void
52
CertificateExtension::decode
(CryptoPP::BufferedTransformation& in)
53
{
54
using namespace
CryptoPP
;
55
56
// Extension ::= SEQUENCE {
57
// extnID OBJECT IDENTIFIER,
58
// critical BOOLEAN DEFAULT FALSE,
59
// extnValue OCTET STRING }
60
61
BERSequenceDecoder extension(in);
62
{
63
m_extensionId
.
decode
(extension);
64
BERDecodeUnsigned(extension,
m_isCritical
, BOOLEAN);
65
66
// the extra copy operation can be optimized, but not trivial,
67
// since the length is not known in advance
68
SecByteBlock tmpBlock;
69
BERDecodeOctetString(extension, tmpBlock);
70
m_extensionValue
.assign(tmpBlock.begin(), tmpBlock.end());
71
}
72
extension.MessageEnd();
73
}
74
75
}
// namespace v1
76
}
// namespace security
77
}
// namespace ndn
ndn::Oid::encode
void encode(CryptoPP::BufferedTransformation &out) const
Definition:
oid.cpp:118
ndn::Oid::decode
void decode(CryptoPP::BufferedTransformation &in)
Definition:
oid.cpp:135
ndn::security::v1::CertificateExtension::encode
void encode(CryptoPP::BufferedTransformation &out) const
Definition:
certificate-extension.cpp:33
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
CryptoPP
Copyright (c) 2013-2016 Regents of the University of California.
Definition:
oid.hpp:29
ndn::security::v1::CertificateExtension::m_extensionId
Oid m_extensionId
Definition:
certificate-extension.hpp:113
ndn::security::v1::CertificateExtension::m_extensionValue
Buffer m_extensionValue
Definition:
certificate-extension.hpp:115
cryptopp.hpp
ndn::Buffer::buf
uint8_t * buf()
Definition:
buffer.hpp:87
ndn::security::v1::CertificateExtension::m_isCritical
bool m_isCritical
Definition:
certificate-extension.hpp:114
ndn::security::v1::CertificateExtension::decode
void decode(CryptoPP::BufferedTransformation &in)
Definition:
certificate-extension.cpp:52
security
certificate-extension.hpp
ndnSIM
ndn-cxx
src
security
v1
certificate-extension.cpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13