monotone

monotone Mtn Source Tree

Root/botan/asn1_oid.h

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

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status