PcapPlusPlus
Next
|
#include <Asn1Codec.h>
Public Member Functions | |
Asn1UtcTimeRecord (const std::chrono::system_clock::time_point &value, bool withSeconds=true) | |
![]() | |
std::chrono::system_clock::time_point | getValue (const std::string &timezone="Z") const |
std::string | getValueAsString (const std::string &format="%Y-%m-%d %H:%M:%S", const std::string &timezone="Z", bool includeMilliseconds=false) const |
![]() | |
std::vector< uint8_t > | encode () const |
Asn1TagClass | getTagClass () const |
bool | isConstructed () const |
Asn1UniversalTagType | getUniversalTagType () const |
uint8_t | getTagType () const |
size_t | getValueLength () const |
size_t | getTotalLength () const |
std::string | toString () const |
template<class Asn1RecordType > | |
Asn1RecordType * | castAs () |
Protected Member Functions | |
void | decodeValue (uint8_t const *data) const override |
Decodes the record value from a byte array into the mutable cache variables. This method is marked as const as it can be called on a const instance of the record for lazy decoding. | |
std::vector< uint8_t > | encodeValue () const override |
Encodes the record value into a byte array Prefer using encodeValueSafe() to ensure the value is decoded first if needed. | |
![]() | |
std::vector< uint8_t > | encodeValueSafe () const |
Encodes the record value into a byte array, ensuring that the value is decoded first if needed. | |
Additional Inherited Members | |
![]() | |
static std::unique_ptr< Asn1Record > | decode (const uint8_t *data, size_t dataLen, bool lazy=true) |
Represents an ASN.1 record with a value of type UTCTime
|
explicit |
A constructor to create a record of type UTC time
[in] | value | A time-point to set as the record value |
[in] | withSeconds | Should write the ASN.1 record with second precision. The default is true |