Botan  2.1.0
Crypto and TLS for C++11
alg_id.h
Go to the documentation of this file.
1 /*
2 * Algorithm Identifier
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7 
8 #ifndef BOTAN_ALGORITHM_IDENTIFIER_H__
9 #define BOTAN_ALGORITHM_IDENTIFIER_H__
10 
11 #include <botan/asn1_obj.h>
12 #include <botan/asn1_oid.h>
13 #include <string>
14 
15 namespace Botan {
16 
17 /**
18 * Algorithm Identifier
19 */
20 class BOTAN_DLL AlgorithmIdentifier final : public ASN1_Object
21  {
22  public:
23  enum Encoding_Option { USE_NULL_PARAM };
24 
25  void encode_into(class DER_Encoder&) const override;
26  void decode_from(class BER_Decoder&) override;
27 
28  AlgorithmIdentifier() = default;
29  AlgorithmIdentifier(const OID&, Encoding_Option);
30  AlgorithmIdentifier(const std::string&, Encoding_Option);
31 
32  AlgorithmIdentifier(const OID&, const std::vector<uint8_t>&);
33  AlgorithmIdentifier(const std::string&, const std::vector<uint8_t>&);
34 
35  // public member variable:
37 
38  // public member variable:
39  std::vector<uint8_t> parameters;
40  };
41 
42 /*
43 * Comparison Operations
44 */
45 bool BOTAN_DLL operator==(const AlgorithmIdentifier&,
46  const AlgorithmIdentifier&);
47 bool BOTAN_DLL operator!=(const AlgorithmIdentifier&,
48  const AlgorithmIdentifier&);
49 
50 }
51 
52 #endif
std::vector< uint8_t > parameters
Definition: alg_id.h:39
bool operator!=(const AlgorithmIdentifier &a1, const AlgorithmIdentifier &a2)
Definition: alg_id.cpp:82
bool operator==(const AlgorithmIdentifier &a1, const AlgorithmIdentifier &a2)
Definition: alg_id.cpp:67
Definition: alg_id.cpp:13