NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
certificate-subject-description.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NDN_SECURITY_V1_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
27 #define NDN_SECURITY_V1_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
28 
29 #include "../../common.hpp"
30 #include "../../encoding/oid.hpp"
31 
32 namespace CryptoPP {
33 class BufferedTransformation;
34 } // namespace CryptoPP
35 
36 namespace ndn {
37 namespace security {
38 namespace v1 {
39 
44 {
45 public:
46  explicit
47  CertificateSubjectDescription(CryptoPP::BufferedTransformation& in)
48  {
49  decode(in);
50  }
51 
57  CertificateSubjectDescription(const Oid& oid, const std::string& value)
58  : m_oid(oid), m_value(value)
59  {
60  }
61 
62  void
63  encode(CryptoPP::BufferedTransformation& out) const;
64 
65  void
66  decode(CryptoPP::BufferedTransformation& in);
67 
68  std::string
69  getOidString() const
70  {
71  return m_oid.toString();
72  }
73 
74  const std::string&
75  getValue() const
76  {
77  return m_value;
78  }
79 
80 private:
81  Oid m_oid;
82  std::string m_value;
83 };
84 
85 } // namespace v1
86 } // namespace security
87 
88 #ifdef NDN_CXX_KEEP_SECURITY_V1_ALIASES
91 #endif // NDN_CXX_KEEP_SECURITY_V1_ALIASES
92 
93 } // namespace ndn
94 
95 #endif // NDN_SECURITY_V1_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
Copyright (c) 2011-2015 Regents of the University of California.
Copyright (c) 2013-2016 Regents of the University of California.
Definition: oid.hpp:29
CertificateSubjectDescription(const Oid &oid, const std::string &value)
Create a new CertificateSubjectDescription.
A CertificateSubjectDescription represents the SubjectDescription entry in a Certificate.
Definition: oid.hpp:35
CertificateSubjectDescription(CryptoPP::BufferedTransformation &in)