NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: 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
}
32
33
namespace
ndn
{
34
35
class
OID
36
{
37
public
:
38
OID
()
39
{
40
}
41
42
explicit
43
OID
(
const
char
* oid);
44
45
explicit
46
OID
(
const
std::string& oid);
47
48
explicit
49
OID
(
const
std::vector<int>& oid)
50
: m_oid(oid)
51
{
52
}
53
54
const
std::vector<int>&
55
getIntegerList
()
const
56
{
57
return
m_oid;
58
}
59
60
void
61
setIntegerList
(
const
std::vector<int>& value)
62
{
63
m_oid = value;
64
}
65
66
std::string
67
toString
()
const
;
68
69
bool
70
operator==
(
const
OID
& oid)
const
71
{
72
return
equal(oid);
73
}
74
75
bool
76
operator!=
(
const
OID
& oid)
const
77
{
78
return
!equal(oid);
79
}
80
81
void
82
encode
(CryptoPP::BufferedTransformation& out)
const
;
83
84
void
85
decode
(CryptoPP::BufferedTransformation& in);
86
87
88
private
:
89
void
90
construct(
const
std::string& value);
91
92
bool
93
equal(
const
OID
& oid)
const
;
94
95
private
:
96
std::vector<int> m_oid;
97
};
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
}
107
108
}
109
110
#endif // NDN_ENCODING_OID_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::OID::OID
OID()
Definition:
oid.hpp:38
CryptoPP
Copyright (c) 2013-2014 Regents of the University of California.
Definition:
oid.hpp:29
ndn::OID::operator==
bool operator==(const OID &oid) const
Definition:
oid.hpp:70
ndn::OID::encode
void encode(CryptoPP::BufferedTransformation &out) const
Definition:
oid.cpp:130
ndn::OID::setIntegerList
void setIntegerList(const std::vector< int > &value)
Definition:
oid.hpp:61
ndn::oid::ATTRIBUTE_NAME
const OID ATTRIBUTE_NAME("2.5.4.41")
Definition:
oid.hpp:105
ndn::OID::decode
void decode(CryptoPP::BufferedTransformation &in)
Definition:
oid.cpp:147
ndn::OID::operator!=
bool operator!=(const OID &oid) const
Definition:
oid.hpp:76
ndn::OID::getIntegerList
const std::vector< int > & getIntegerList() const
Definition:
oid.hpp:55
ndn::OID::OID
OID(const std::vector< int > &oid)
Definition:
oid.hpp:49
ndn::OID
Definition:
oid.hpp:35
ndn::OID::toString
std::string toString() const
Definition:
oid.cpp:70
ndn::oid::ECDSA
const OID ECDSA("1.2.840.10045.2.1")
Definition:
oid.hpp:102
ndn::oid::RSA
const OID RSA("1.2.840.113549.1.1.1")
Definition:
oid.hpp:101
ndnSIM
ndn-cxx
src
encoding
oid.hpp
Generated on Fri Feb 23 2018 12:30:54 for ndnSIM by
1.8.14