Botan 2.19.5 Crypto and TLS for C&

Public Member Functions | List of all members
Botan::ASN1_Object Class Referenceabstract

`#include <asn1_obj.h>`

Inheritance diagram for Botan::ASN1_Object:

## Public Member Functions
| ASN1_Object ()=default
| ASN1_Object (const ASN1_Object &)=default
std::vector< uint8_t > | BER_encode () const
virtual void | decode_from (BER_Decoder &from)=0
virtual void | encode_into (DER_Encoder &to) const =0
ASN1_Object & | operator= (const ASN1_Object &)=default
virtual | ~ASN1_Object ()

## Detailed Description

Basic ASN.1 Object Interface

Definition at line 68 of file asn1_obj.h.

## Constructor & Destructor Documentation

## ◆ ASN1_Object() [1/2]

Botan::ASN1_Object::ASN1_Object | ( |  | ) |
| default

## ◆ ASN1_Object() [2/2]

Botan::ASN1_Object::ASN1_Object | ( | const ASN1_Object & |  | ) |
| default

## ◆ ~ASN1_Object()

virtual Botan::ASN1_Object::~ASN1_Object | ( |  | ) |
| inline virtual

Definition at line 93 of file asn1_obj.h.

93{}

## Member Function Documentation

## ◆ BER_encode()

std::vector< uint8_t > Botan::ASN1_Object::BER_encode | ( |  | ) | const

Return the encoding of this object. This is a convenience method when just one object needs to be serialized. Use DER_Encoder for complicated encodings.

Definition at line 16 of file asn1_obj.cpp.

17 {
18 std::vector<uint8_t> output;
19 DER_Encoder der(output);
20 this->encode_into(der);
21 return output;
22 }
Botan::ASN1_Object::encode_into
virtual void encode_into(DER_Encoder &to) const =0

References encode_into().

Referenced by Botan::PSSR::config_for_x509(), Botan::Certificate_Store_In_SQL::find_all_certs(), Botan::Certificate_Store_In_SQL::find_cert(), Botan::X509_Certificate::fingerprint(), Botan::Certificate_Store_In_SQL::insert_cert(), Botan::X509_Object::PEM_encode(), and Botan::Certificate_Store_In_SQL::revoke_cert().

## ◆ decode_from()

virtual void Botan::ASN1_Object::decode_from | ( | BER_Decoder & | from | ) |
| pure virtual

Decode whatever this object is from from

Parameters

  from | the BER_Decoder that will be read from

Implemented in Botan::ASN1_Time, Botan::X509_DN, Botan::AlternativeName, Botan::GeneralName, Botan::GeneralSubtree, Botan::Attribute, Botan::OID, Botan::ASN1_String, Botan::AlgorithmIdentifier, Botan::Extensions, Botan::CRL_Entry, Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point, Botan::OCSP::CertID, Botan::OCSP::SingleResponse, and Botan::X509_Object.

Referenced by Botan::BER_Decoder::decode().

## ◆ encode_into()

virtual void Botan::ASN1_Object::encode_into | ( | DER_Encoder & | to | ) | const
| pure virtual

Encode whatever this object is into to

Parameters

  to | the DER_Encoder that will be written to

Implemented in Botan::OID, Botan::ASN1_String, Botan::AlgorithmIdentifier, Botan::Extensions, Botan::CRL_Entry, Botan::Cert_Extension::CRL_Distribution_Points::Distribution_Point, Botan::OCSP::CertID, Botan::OCSP::SingleResponse, Botan::X509_Object, Botan::ASN1_Time, Botan::X509_DN, Botan::AlternativeName, Botan::GeneralName, Botan::GeneralSubtree, and Botan::Attribute.

Referenced by BER_encode(), and Botan::DER_Encoder::encode().

## ◆ operator=()

ASN1_Object & Botan::ASN1_Object::operator= | ( | const ASN1_Object & |  | ) |
| default

The documentation for this class was generated from the following files:

- src/lib/asn1/asn1_obj.h
- src/lib/asn1/asn1_obj.cpp