Botan

ASN.1 Internals

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

enum  ASN1Tag: int;

ASN.1 Type and Class Tags


interface  ASN1Object;

Basic ASN.1 Object Interface


abstract const void  encodeInto(ref DEREncoder to);

Encode whatever this object is into to

Parameters
DEREncoder to the DEREncoder that will be written to

abstract void  decodeFrom(ref BERDecoder from);

Decode whatever this object is from from

Parameters
BERDecoder from the BERDecoder that will be read from

struct  BERObject;

BER Encoded Object


void  assertIsA(ASN1Tag type_tag, ASN1Tag class_tag);

Check a type invariant on BER data


string  toString();

Convert a BER object into a string object


class  BERDecodingError: botan.utils.exceptn.DecodingError;

General BER Decoding Error Exception


class  BERBadTag: botan.asn1.asn1_obj.BERDecodingError;

Exception For Incorrect BER Taggings


Vector!ubyte  putInSequence(ALLOC)(auto ref const Vector!(ubyte, ALLOC) contents);
Vector!ubyte  putInSequence(ALLOC)(auto ref const RefCounted!(Vector!(ubyte, ALLOC), ALLOC) contents);

Put some arbitrary bytes into a ASN1Tag.SEQUENCE


bool  maybeBER(DataSource source);

Heuristics tests; is this object possibly BER?

Parameters
DataSource source a data source that will be peeked at but not modified