Botan
1.10.9
|
#include <asn1_oid.h>
Public Member Functions | |
std::string | as_string () const |
void | clear () |
void | decode_from (class BER_Decoder &) |
void | encode_into (class DER_Encoder &) const |
std::vector< u32bit > | get_id () const |
bool | is_empty () const |
OID (const std::string &str="") | |
OID & | operator+= (u32bit new_comp) |
bool | operator== (const OID &) const |
This class represents ASN.1 object identifiers.
Definition at line 20 of file asn1_oid.h.
Botan::OID::OID | ( | const std::string & | str = "" | ) |
Construct an OID from a string.
str | a string in the form "a.b.c" etc., where a,b,c are numbers |
Definition at line 19 of file asn1_oid.cpp.
References Botan::parse_asn1_oid().
std::string Botan::OID::as_string | ( | ) | const |
Get this OID as a string
Definition at line 50 of file asn1_oid.cpp.
References Botan::to_string().
Referenced by Botan::OIDS::add_oid(), Botan::Extensions::decode_from(), Botan::EC_Group::EC_Group(), Botan::get_pbe(), Botan::X509_Object::hash_used_for_signature(), Botan::PKCS8::load_key(), Botan::OIDS::lookup(), Botan::make_private_key(), and Botan::make_public_key().
void Botan::OID::clear | ( | ) |
Reset this instance to an empty OID.
Definition at line 42 of file asn1_oid.cpp.
Referenced by decode_from().
|
virtual |
Decode whatever this object is from from
from | the BER_Decoder that will be read from |
Implements Botan::ASN1_Object.
Definition at line 155 of file asn1_oid.cpp.
References Botan::BER_Object::class_tag, clear(), Botan::BER_Decoder::get_next_object(), Botan::OBJECT_ID, Botan::MemoryRegion< T >::size(), Botan::BER_Object::type_tag, Botan::UNIVERSAL, and Botan::BER_Object::value.
|
virtual |
Encode whatever this object is into to
to | the DER_Encoder that will be written to |
Implements Botan::ASN1_Object.
Definition at line 127 of file asn1_oid.cpp.
References Botan::DER_Encoder::add_object(), Botan::high_bit(), Botan::OBJECT_ID, Botan::MemoryRegion< T >::push_back(), and Botan::UNIVERSAL.
|
inline |
Get this OID as list (vector) of its components.
Definition at line 36 of file asn1_oid.h.
Referenced by Botan::operator<().
|
inline |
Find out whether this OID is empty
Definition at line 30 of file asn1_oid.h.
Add a component to this OID.
new_comp | the new component to add to the end of this OID |
Definition at line 78 of file asn1_oid.cpp.
bool Botan::OID::operator== | ( | const OID & | oid | ) | const |
Compare two OIDs.
Definition at line 65 of file asn1_oid.cpp.