Botan
1.11.15
|
#include <asn1_attribute.h>
Public Member Functions | |
Attribute () | |
Attribute (const OID &, const std::vector< byte > &) | |
Attribute (const std::string &, const std::vector< byte > &) | |
void | decode_from (class BER_Decoder &from) |
void | encode_into (class DER_Encoder &to) const |
Public Attributes | |
OID | oid |
std::vector< byte > | parameters |
Definition at line 20 of file asn1_attribute.h.
Botan::Attribute::Attribute | ( | ) | [inline] |
Definition at line 29 of file asn1_attribute.h.
{}
Botan::Attribute::Attribute | ( | const OID & | attr_oid, |
const std::vector< byte > & | attr_value | ||
) |
Definition at line 18 of file asn1_attribute.cpp.
References oid, and parameters.
{ oid = attr_oid; parameters = attr_value; }
Botan::Attribute::Attribute | ( | const std::string & | attr_oid, |
const std::vector< byte > & | attr_value | ||
) |
Definition at line 27 of file asn1_attribute.cpp.
References Botan::OIDS::lookup(), oid, and parameters.
{ oid = OIDS::lookup(attr_oid); parameters = attr_value; }
void Botan::Attribute::decode_from | ( | class BER_Decoder & | 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 50 of file asn1_attribute.cpp.
References Botan::BER_Decoder::decode(), Botan::BER_Decoder::end_cons(), oid, parameters, Botan::BER_Decoder::raw_bytes(), Botan::SEQUENCE, Botan::SET, and Botan::BER_Decoder::start_cons().
{ codec.start_cons(SEQUENCE) .decode(oid) .start_cons(SET) .raw_bytes(parameters) .end_cons() .end_cons(); }
void Botan::Attribute::encode_into | ( | class DER_Encoder & | to | ) | const [virtual] |
Encode whatever this object is into to
to | the DER_Encoder that will be written to |
Implements Botan::ASN1_Object.
Definition at line 37 of file asn1_attribute.cpp.
References Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), oid, parameters, Botan::DER_Encoder::raw_bytes(), Botan::SEQUENCE, Botan::SET, and Botan::DER_Encoder::start_cons().
{ codec.start_cons(SEQUENCE) .encode(oid) .start_cons(SET) .raw_bytes(parameters) .end_cons() .end_cons(); }
Definition at line 26 of file asn1_attribute.h.
Referenced by Attribute(), decode_from(), and encode_into().
std::vector<byte> Botan::Attribute::parameters |
Definition at line 27 of file asn1_attribute.h.
Referenced by Attribute(), decode_from(), and encode_into().