Botan

ASN.1 OID

License
Botan is released under the Simplified BSD License (see LICENSE.md)

class  OIDImpl: botan.asn1.asn1_obj.ASN1Object;

This class represents ASN.1 object identifiers.


const @property bool  empty();

Find out whether this OID is  empty

Returns
true is no OID value is set

const ref const(Vector!uint)  getId();

Get this OID as list (vector) of its components.

Returns
vector representing this OID

const string  toString();

Get this OID as a string

Returns
string representing this OID

const bool  opEquals(in OIDImpl oid);

Compare two OIDs.

Returns
true if they are equal, false otherwise

void  clear();

Reset this instance to an empty OID.


OID  opBinary(string op)(in OID oid, uint component) if (op == "+");

Append another component onto the OID.

Parameters
OID oid the OID to add the new component to
uint component the new component to add

const int  opCmp(in OID b);

Compare two OIDs.

Parameters
OID b the second OID
Returns
true if a is not equal to b

bool  opBinary(string op)(in OID b) if (op == "<");

Compare two OIDs.

Parameters
OID b the second OID
Returns
true if a is lexicographically smaller than b

void  opOpAssign(string op)(uint new_comp) if (op == "~");

Add a component to this OID.

Parameters
uint new_comp the new component to add to the end of this OID
Returns
reference to this

this(in string oid_str = "");

Construct an OID from a string.

Parameters
string oid_str a string in the form "a.b.c" etc., where a,b,c are numbers