Botan
1.11.15
|
#include <alg_id.h>
Public Types | |
enum | Encoding_Option { USE_NULL_PARAM } |
Public Member Functions | |
AlgorithmIdentifier () | |
AlgorithmIdentifier (const OID &, Encoding_Option) | |
AlgorithmIdentifier (const std::string &, Encoding_Option) | |
AlgorithmIdentifier (const OID &, const std::vector< byte > &) | |
AlgorithmIdentifier (const std::string &, const std::vector< byte > &) | |
void | decode_from (class BER_Decoder &) |
void | encode_into (class DER_Encoder &) const |
Public Attributes | |
OID | oid |
std::vector< byte > | parameters |
Botan::AlgorithmIdentifier::AlgorithmIdentifier | ( | ) | [inline] |
Botan::AlgorithmIdentifier::AlgorithmIdentifier | ( | const OID & | alg_id, |
Encoding_Option | option | ||
) |
Definition at line 38 of file alg_id.cpp.
References oid, parameters, and USE_NULL_PARAM.
{ const byte DER_NULL[] = { 0x05, 0x00 }; oid = alg_id; if(option == USE_NULL_PARAM) parameters += std::pair<const byte*, size_t>(DER_NULL, sizeof(DER_NULL)); }
Botan::AlgorithmIdentifier::AlgorithmIdentifier | ( | const std::string & | alg_id, |
Encoding_Option | option | ||
) |
Definition at line 52 of file alg_id.cpp.
References Botan::OIDS::lookup(), oid, parameters, and USE_NULL_PARAM.
{ const byte DER_NULL[] = { 0x05, 0x00 }; oid = OIDS::lookup(alg_id); if(option == USE_NULL_PARAM) parameters += std::pair<const byte*, size_t>(DER_NULL, sizeof(DER_NULL)); }
Botan::AlgorithmIdentifier::AlgorithmIdentifier | ( | const OID & | alg_id, |
const std::vector< byte > & | param | ||
) |
Definition at line 18 of file alg_id.cpp.
References oid, and parameters.
{ oid = alg_id; parameters = param; }
Botan::AlgorithmIdentifier::AlgorithmIdentifier | ( | const std::string & | alg_id, |
const std::vector< byte > & | param | ||
) |
Definition at line 28 of file alg_id.cpp.
References Botan::OIDS::lookup(), oid, and parameters.
{ oid = OIDS::lookup(alg_id); parameters = param; }
void Botan::AlgorithmIdentifier::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 97 of file alg_id.cpp.
References Botan::BER_Decoder::decode(), Botan::BER_Decoder::end_cons(), oid, parameters, Botan::BER_Decoder::raw_bytes(), Botan::SEQUENCE, and Botan::BER_Decoder::start_cons().
{ codec.start_cons(SEQUENCE) .decode(oid) .raw_bytes(parameters) .end_cons(); }
void Botan::AlgorithmIdentifier::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 86 of file alg_id.cpp.
References Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), oid, parameters, Botan::DER_Encoder::raw_bytes(), Botan::SEQUENCE, and Botan::DER_Encoder::start_cons().
{ codec.start_cons(SEQUENCE) .encode(oid) .raw_bytes(parameters) .end_cons(); }
Definition at line 35 of file alg_id.h.
Referenced by AlgorithmIdentifier(), Botan::EAC_Signed_Object::check_signature(), Botan::X509_Object::check_signature(), Botan::choose_sig_format(), Botan::CVC_EAC::create_ado_req(), Botan::CVC_EAC::create_cvc_req(), decode_from(), Botan::EC_PrivateKey::EC_PrivateKey(), encode_into(), Botan::X509_Object::hash_used_for_signature(), Botan::OCSP::CertID::is_id_for(), Botan::DE_EAC::link_cvca(), Botan::PKCS8::load_key(), Botan::make_private_key(), Botan::make_public_key(), Botan::operator==(), Botan::pbes2_decrypt(), and Botan::DE_EAC::sign_request().
std::vector<byte> Botan::AlgorithmIdentifier::parameters |
Definition at line 36 of file alg_id.h.
Referenced by AlgorithmIdentifier(), Botan::choose_sig_format(), decode_from(), Botan::DL_Scheme_PrivateKey::DL_Scheme_PrivateKey(), Botan::DL_Scheme_PublicKey::DL_Scheme_PublicKey(), Botan::EC_PrivateKey::EC_PrivateKey(), Botan::EC_PublicKey::EC_PublicKey(), encode_into(), Botan::GOST_3410_PublicKey::GOST_3410_PublicKey(), Botan::operator==(), and Botan::pbes2_decrypt().