blob: b2bdd4867a0e2c62999068d971ad9c85f4182f57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/*************************************************
* ASN.1 OID Header File *
* (C) 1999-2006 The Botan Project *
*************************************************/
#ifndef BOTAN_ASN1_OID_H__
#define BOTAN_ASN1_OID_H__
#include <botan/asn1_int.h>
#include <string>
#include <vector>
namespace Botan {
/*************************************************
* ASN.1 Object Identifier *
*************************************************/
class OID : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const;
bool is_empty() const { return id.size() == 0; }
std::vector<u32bit> get_id() const { return id; }
std::string as_string() const;
bool operator==(const OID&) const;
void clear();
OID& operator+=(u32bit);
OID(const std::string& = "");
private:
std::vector<u32bit> id;
};
/*************************************************
* Append another component onto the OID *
*************************************************/
OID operator+(const OID&, u32bit);
/*************************************************
* Compare two OIDs *
*************************************************/
bool operator!=(const OID&, const OID&);
bool operator<(const OID&, const OID&);
}
#endif
|