NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: 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_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
27 #define NDN_SECURITY_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
28 
29 #include "../common.hpp"
30 #include "../encoding/oid.hpp"
31 
32 namespace CryptoPP {
33 class BufferedTransformation;
34 }
35 
36 namespace ndn {
37 
42 {
43 public:
44  explicit
45  CertificateSubjectDescription(CryptoPP::BufferedTransformation& in)
46  {
47  decode(in);
48  }
49 
55  CertificateSubjectDescription(const OID& oid, const std::string& value)
56  : m_oid(oid), m_value(value)
57  {
58  }
59 
60  void
61  encode(CryptoPP::BufferedTransformation& out) const;
62 
63  void
64  decode(CryptoPP::BufferedTransformation& in);
65 
66  std::string
67  getOidString() const
68  {
69  return m_oid.toString();
70  }
71 
72  const std::string&
73  getValue() const
74  {
75  return m_value;
76  }
77 
78 private:
79  OID m_oid;
80  std::string m_value;
81 };
82 
83 } // namespace ndn
84 
85 #endif //NDN_SECURITY_CERTIFICATE_SUBJECT_DESCRIPTION_HPP
Copyright (c) 2011-2015 Regents of the University of California.
Copyright (c) 2013-2014 Regents of the University of California.
Definition: oid.hpp:29
A CertificateSubjectDescription represents the SubjectDescription entry in a Certificate.
CertificateSubjectDescription(CryptoPP::BufferedTransformation &in)
Definition: oid.hpp:35
CertificateSubjectDescription(const OID &oid, const std::string &value)
Create a new CertificateSubjectDescription.