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
signature.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#include "
signature.hpp
"
23
24
namespace
ndn
{
25
26
BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Signature>));
27
static_assert(std::is_base_of<tlv::Error, Signature::Error>::value,
28
"Signature::Error must inherit from tlv::Error"
);
29
30
Signature::Signature
(
const
Block
& info,
const
Block
& value)
31
: m_info(info)
32
, m_value(value)
33
{
34
}
35
36
37
Signature::Signature
(
const
SignatureInfo
& info,
const
Block
& value)
38
:
m_info
(info)
39
,
m_value
(value)
40
{
41
}
42
43
void
44
Signature::setInfo
(
const
Block
& info)
45
{
46
m_info
=
SignatureInfo
(info);
47
}
48
49
void
50
Signature::setValue
(
const
Block
& value)
51
{
52
if
(value.
type
() !=
tlv::SignatureValue
) {
53
BOOST_THROW_EXCEPTION(
Error
(
"The supplied block is not SignatureValue"
));
54
}
55
m_value
= value;
56
}
57
58
}
// namespace ndn
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::Signature::Signature
Signature()=default
ndn::SignatureInfo
Definition:
signature-info.hpp:32
ndn::tlv::SignatureValue
Definition:
tlv.hpp:80
ndn::Signature::setInfo
void setInfo(const Block &info)
Set SignatureInfo from a block.
Definition:
signature.cpp:44
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::tlv::SignatureInfo
Definition:
tlv.hpp:79
signature.hpp
ndn::Signature::setValue
void setValue(const Block &value)
Get SignatureValue from a block.
Definition:
signature.cpp:50
ndn::Signature::Error
Definition:
signature.hpp:36
ndn::Signature::m_info
SignatureInfo m_info
Definition:
signature.hpp:184
ndn::Signature::m_value
Block m_value
Definition:
signature.hpp:185
ndn::Block::type
uint32_t type() const
Definition:
block.hpp:324
ndnSIM
ndn-cxx
src
signature.cpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13