NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
oid.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_ENCODING_OID_HPP
23
#define NDN_ENCODING_OID_HPP
24
25
#include "../common.hpp"
26
27
#include <vector>
28
29
namespace
CryptoPP
{
30
class
BufferedTransformation;
31
}
// namespace CryptoPP
32
33
namespace
ndn
{
34
35
class
Oid
36
{
37
public
:
38
Oid
() =
default
;
39
40
explicit
41
Oid
(
const
char
* oid);
42
43
explicit
44
Oid
(
const
std::string& oid);
45
46
explicit
47
Oid
(
const
std::vector<int>& oid)
48
: m_oid(oid)
49
{
50
}
51
52
const
std::vector<int>&
53
getIntegerList
()
const
54
{
55
return
m_oid;
56
}
57
58
void
59
setIntegerList
(
const
std::vector<int>& value)
60
{
61
m_oid = value;
62
}
63
64
std::string
65
toString
()
const
;
66
67
bool
68
operator==
(
const
Oid
& oid)
const
69
{
70
return
equal(oid);
71
}
72
73
bool
74
operator!=
(
const
Oid
& oid)
const
75
{
76
return
!equal(oid);
77
}
78
79
void
80
encode(CryptoPP::BufferedTransformation& out)
const
;
81
82
void
83
decode(CryptoPP::BufferedTransformation& in);
84
85
86
private
:
87
bool
88
equal(
const
Oid
& oid)
const
;
89
90
private
:
91
std::vector<int> m_oid;
92
};
93
97
typedef
Oid
OID
;
98
99
namespace
oid {
100
// crypto algorithm
101
extern
const
Oid
RSA
;
102
extern
const
Oid
ECDSA
;
103
104
// certificate entries
105
extern
const
Oid
ATTRIBUTE_NAME
;
106
}
// namespace oid
107
108
}
// namespace ndn
109
110
#endif // NDN_ENCODING_OID_HPP
ndn::oid::ECDSA
const Oid ECDSA("1.2.840.10045.2.1")
Definition:
oid.hpp:102
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::Oid::getIntegerList
const std::vector< int > & getIntegerList() const
Definition:
oid.hpp:53
CryptoPP
Copyright (c) 2013-2016 Regents of the University of California.
Definition:
oid.hpp:29
ndn::oid::ATTRIBUTE_NAME
const Oid ATTRIBUTE_NAME("2.5.4.41")
Definition:
oid.hpp:105
ndn::time::toString
std::string toString(const system_clock::TimePoint &timePoint, const std::string &format, const std::locale &locale)
Convert time point to string with specified format.
Definition:
time.cpp:162
ndn::oid::RSA
const Oid RSA("1.2.840.113549.1.1.1")
Definition:
oid.hpp:101
ndn::Oid::Oid
Oid(const std::vector< int > &oid)
Definition:
oid.hpp:47
ndn::OID
Oid OID
Definition:
oid.hpp:97
ndn::Oid::setIntegerList
void setIntegerList(const std::vector< int > &value)
Definition:
oid.hpp:59
ndn::Oid
Definition:
oid.hpp:35
ndn::Oid::operator!=
bool operator!=(const Oid &oid) const
Definition:
oid.hpp:74
ndn::Oid::operator==
bool operator==(const Oid &oid) const
Definition:
oid.hpp:68
ndnSIM
ndn-cxx
src
encoding
oid.hpp
Generated on Wed Jan 11 2017 18:17:13 for ndnSIM by
1.8.13