Botan
1.10.9
|
#include <eac_asn_obj.h>
Public Member Functions | |
void | add_months (u32bit months) |
void | add_years (u32bit years) |
std::string | as_string () const |
s32bit | cmp (const EAC_Time &other) const |
void | decode_from (class BER_Decoder &) |
EAC_Time (u64bit, ASN1_Tag t=ASN1_Tag(0)) | |
EAC_Time (const std::string &, ASN1_Tag=ASN1_Tag(0)) | |
EAC_Time (u32bit year, u32bit month, u32bit day, ASN1_Tag=ASN1_Tag(0)) | |
void | encode_into (class DER_Encoder &) const |
u32bit | get_day () const |
u32bit | get_month () const |
u32bit | get_year () const |
std::string | readable_string () const |
void | set_to (const std::string &str) |
bool | time_is_set () const |
virtual | ~EAC_Time () |
This class represents CVC EAC Time objects. It only models year, month and day. Only limited sanity checks of the inputted date value are performed.
Definition at line 21 of file eac_asn_obj.h.
Definition at line 54 of file asn1_eac_tm.cpp.
References Botan::calendar_value(), Botan::calendar_point::day, Botan::calendar_point::month, and Botan::calendar_point::year.
Definition at line 73 of file asn1_eac_tm.cpp.
|
inlinevirtual |
Definition at line 96 of file eac_asn_obj.h.
void Botan::EAC_Time::add_months | ( | u32bit | months | ) |
Add the specified number of months to this.
months | the number of months to add |
Definition at line 190 of file asn1_eac_tm.cpp.
Referenced by Botan::DE_EAC::create_cvca(), and Botan::DE_EAC::sign_request().
void Botan::EAC_Time::add_years | ( | u32bit | years | ) |
Add the specified number of years to this.
years | the number of years to add |
Definition at line 186 of file asn1_eac_tm.cpp.
std::string Botan::EAC_Time::as_string | ( | ) | const |
Get a this objects value as a string.
Definition at line 130 of file asn1_eac_tm.cpp.
References time_is_set(), and Botan::to_string().
Referenced by Botan::DE_EAC::link_cvca().
Compare this to another EAC_Time object.
Definition at line 205 of file asn1_eac_tm.cpp.
References time_is_set().
Referenced by Botan::operator!=(), Botan::operator<(), Botan::operator<=(), Botan::operator==(), Botan::operator>(), and Botan::operator>=().
|
virtual |
Decode whatever this object is from from
from | the BER_Decoder that will be read from |
Implements Botan::ASN1_Object.
Definition at line 258 of file asn1_eac_tm.cpp.
References Botan::BER_Decoder::get_next_object(), Botan::MemoryRegion< T >::size(), Botan::BER_Object::type_tag, and Botan::BER_Object::value.
|
virtual |
Encode whatever this object is into to
to | the DER_Encoder that will be written to |
Implements Botan::ASN1_Object.
Definition at line 121 of file asn1_eac_tm.cpp.
References Botan::DER_Encoder::add_object(), and Botan::APPLICATION.
u32bit Botan::EAC_Time::get_day | ( | ) | const |
u32bit Botan::EAC_Time::get_month | ( | ) | const |
Get the month value of this objects.
Definition at line 291 of file asn1_eac_tm.cpp.
u32bit Botan::EAC_Time::get_year | ( | ) | const |
Get the year value of this objects.
Definition at line 286 of file asn1_eac_tm.cpp.
std::string Botan::EAC_Time::readable_string | ( | ) | const |
Get a this objects value as a readable formatted string.
Definition at line 154 of file asn1_eac_tm.cpp.
References time_is_set(), and Botan::to_string().
void Botan::EAC_Time::set_to | ( | const std::string & | str | ) |
Set this' value by a string value.
str | a string in the format "yyyy mm dd", e.g. "2007 08 01" |
Definition at line 81 of file asn1_eac_tm.cpp.
References Botan::Charset::is_digit(), and Botan::to_u32bit().
Referenced by EAC_Time().
bool Botan::EAC_Time::time_is_set | ( | ) | const |
Find out whether this object's values have been set.
Definition at line 146 of file asn1_eac_tm.cpp.
Referenced by as_string(), cmp(), and readable_string().