Botan 3.0.0
Crypto and TLS for C&
|
#include <asn1_obj.h>
Public Member Functions | |
ASN1_String (std::string_view utf8, ASN1_Type tag) | |
ASN1_String (std::string_view utf8="") | |
std::vector< uint8_t > | BER_encode () const |
void | decode_from (BER_Decoder &) override |
bool | empty () const |
void | encode_into (DER_Encoder &) const override |
bool | operator== (const ASN1_String &other) const |
size_t | size () const |
ASN1_Type | tagging () const |
const std::string & | value () const |
Static Public Member Functions | |
static bool | is_string_type (ASN1_Type tag) |
ASN.1 string type This class normalizes all inputs to a UTF-8 std::string
Definition at line 428 of file asn1_obj.h.
|
explicit |
Definition at line 82 of file asn1_str.cpp.
Botan::ASN1_String::ASN1_String | ( | std::string_view | utf8, |
ASN1_Type | tag | ||
) |
Definition at line 74 of file asn1_str.cpp.
|
inherited |
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 17 of file asn1_obj.cpp.
References Botan::ASN1_Object::encode_into().
Referenced by Botan::PSS_Params::decode_from(), 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().
|
overridevirtual |
Decode whatever this object is from from
from | the BER_Decoder that will be read from |
Implements Botan::ASN1_Object.
Definition at line 106 of file asn1_str.cpp.
References Botan::BER_Object::bits(), Botan::BmpString, Botan::fmt(), Botan::BER_Decoder::get_next_object(), Botan::latin1_to_utf8(), Botan::BER_Object::length(), Botan::TeletexString, Botan::ASN1::to_string(), Botan::BER_Object::type(), Botan::ucs2_to_utf8(), Botan::ucs4_to_utf8(), and Botan::UniversalString.
|
inline |
Definition at line 440 of file asn1_obj.h.
Referenced by Botan::X509_DN::add_attribute().
|
overridevirtual |
Encode whatever this object is into to
to | the DER_Encoder that will be written to |
Implements Botan::ASN1_Object.
Definition at line 89 of file asn1_str.cpp.
References Botan::DER_Encoder::add_object(), BOTAN_ASSERT_NOMSG, tagging(), and Botan::Universal.
|
static |
Return true iff this is a tag for a known string type we can handle.
Definition at line 69 of file asn1_str.cpp.
Referenced by Botan::AlternativeName::decode_from().
|
inline |
|
inline |
Definition at line 438 of file asn1_obj.h.
|
inline |
|
inline |
Definition at line 436 of file asn1_obj.h.
Referenced by Botan::X509_DN::get_first_attribute(), operator==(), and Botan::TLS::Session::Session().