Botan  2.4.0
Crypto and TLS for C++11
asn1_attribute.h
Go to the documentation of this file.
1 /*
2 * ASN.1 Attribute
3 * (C) 1999-2007,2012 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7 
8 #ifndef BOTAN_ASN1_ATTRIBUTE_H_
9 #define BOTAN_ASN1_ATTRIBUTE_H_
10 
11 #include <botan/asn1_obj.h>
12 #include <botan/asn1_oid.h>
13 #include <vector>
14 
15 namespace Botan {
16 
17 /**
18 * Attribute
19 */
20 class BOTAN_PUBLIC_API(2,0) Attribute final : public ASN1_Object
21  {
22  public:
23  void encode_into(class DER_Encoder& to) const override;
24  void decode_from(class BER_Decoder& from) override;
25 
26  Attribute() = default;
27  Attribute(const OID&, const std::vector<uint8_t>&);
28  Attribute(const std::string&, const std::vector<uint8_t>&);
29 
30  const OID& get_oid() const { return oid; }
31 
32  const std::vector<uint8_t>& get_parameters() const { return parameters; }
33 
34  /*
35  * These values are public for historical reasons, but in a future release
36  * they will be made private. Do not access them.
37  */
39  std::vector<uint8_t> parameters;
40  };
41 
42 }
43 
44 #endif
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:27
const OID & get_oid() const
std::vector< uint8_t > parameters
Definition: alg_id.cpp:13
const std::vector< uint8_t > & get_parameters() const
CK_ATTRIBUTE Attribute
Definition: p11.h:845