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
public-key.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_CXX_SECURITY_TRANSFORM_PUBLIC_KEY_HPP
23
#define NDN_CXX_SECURITY_TRANSFORM_PUBLIC_KEY_HPP
24
25
#include "../security-common.hpp"
26
#include "../../encoding/buffer.hpp"
27
28
namespace
ndn
{
29
namespace
security
{
30
namespace
transform {
31
32
class
VerifierFilter;
33
37
class
PublicKey
: noncopyable
38
{
39
public
:
40
class
Error
:
public
std::runtime_error
41
{
42
public
:
43
explicit
44
Error
(
const
std::string& what)
45
:
std
::runtime_error(what)
46
{
47
}
48
};
49
50
friend
class
VerifierFilter
;
51
52
public
:
58
PublicKey
();
59
60
~PublicKey
();
61
65
KeyType
66
getKeyType
()
const
;
67
71
void
72
loadPkcs8
(
const
uint8_t* buf,
size_t
size);
73
77
void
78
loadPkcs8
(std::istream& is);
79
83
void
84
loadPkcs8Base64
(
const
uint8_t* buf,
size_t
size);
85
89
void
90
loadPkcs8Base64
(std::istream& is);
91
95
void
96
savePkcs8
(std::ostream& os)
const
;
97
101
void
102
savePkcs8Base64
(std::ostream& os)
const
;
103
109
ConstBufferPtr
110
encrypt
(
const
uint8_t* plainText,
size_t
plainLen)
const
;
111
112
private
:
118
void
*
119
getEvpPkey()
const
;
120
121
private
:
122
ConstBufferPtr
123
toPkcs8()
const
;
124
125
ConstBufferPtr
126
rsaEncrypt(
const
uint8_t* plainText,
size_t
plainLen)
const
;
127
128
private
:
129
class
Impl;
130
unique_ptr<Impl> m_impl;
131
};
132
133
}
// namespace transform
134
}
// namespace security
135
}
// namespace ndn
136
137
#endif // NDN_CXX_SECURITY_TRANSFORM_PUBLIC_KEY_HPP
ndn::security::transform::PublicKey::getKeyType
KeyType getKeyType() const
Get the type of the public key.
Definition:
public-key.cpp:66
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::transform::VerifierFilter
The module to verify signature.
Definition:
verifier-filter.hpp:38
std
STL namespace.
ndn::security::transform::PublicKey
Abstraction of public key in crypto transformation.
Definition:
public-key.hpp:37
ndn::KeyType
KeyType
Definition:
security-common.hpp:50
ndn::security::transform::PublicKey::Error
Definition:
public-key.hpp:40
ndn::security::transform::PublicKey::~PublicKey
~PublicKey()
ndn::security::transform::PublicKey::loadPkcs8
void loadPkcs8(const uint8_t *buf, size_t size)
Load the public key in PKCS#8 format from a buffer buf.
Definition:
public-key.cpp:85
ndn::security::transform::PublicKey::encrypt
ConstBufferPtr encrypt(const uint8_t *plainText, size_t plainLen) const
Definition:
public-key.cpp:140
ndn::security::transform::PublicKey::loadPkcs8Base64
void loadPkcs8Base64(const uint8_t *buf, size_t size)
Load the public key in base64-encoded PKCS#8 format from a buffer buf.
Definition:
public-key.cpp:104
ndn::security::transform::PublicKey::Error::Error
Error(const std::string &what)
Definition:
public-key.hpp:44
ndn::security::transform::PublicKey::PublicKey
PublicKey()
Create a public key instance.
Definition:
public-key.cpp:58
ndn::security::transform::PublicKey::savePkcs8Base64
void savePkcs8Base64(std::ostream &os) const
Save the public key in base64-encoded PKCS#8 format into a stream os.
Definition:
public-key.cpp:133
ndn::security::transform::PublicKey::savePkcs8
void savePkcs8(std::ostream &os) const
Save the public key in PKCS#8 format into a stream os.
Definition:
public-key.cpp:126
ndn::ConstBufferPtr
shared_ptr< const Buffer > ConstBufferPtr
Definition:
buffer.hpp:33
security
ndnSIM
ndn-cxx
src
security
transform
public-key.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13