37 #ifndef VIRGIL_CRYPTO_VIRGIL_ASN1_COMPATIBLE_H
38 #define VIRGIL_CRYPTO_VIRGIL_ASN1_COMPATIBLE_H
40 #include <virgil/crypto/VirgilByteArray.h>
45 namespace virgil {
namespace crypto {
namespace foundation {
namespace asn1 {
47 class VirgilAsn1Reader;
49 class VirgilAsn1Writer;
54 namespace virgil {
namespace crypto {
namespace foundation {
namespace asn1 {
This class provides methods for reading ASN.1 data structure.
Definition: VirgilAsn1Reader.h:53
This class provides interface that allow to save and restore object state in the ASN.1 structure.
Definition: VirgilAsn1Compatible.h:59
This class provides methods for writing ASN.1 data structure.
Definition: VirgilAsn1Writer.h:54
virtual ~VirgilAsn1Compatible() noexcept
Polymorphic destructor.
Definition: VirgilAsn1Compatible.h:74
virtual void asn1Read(VirgilAsn1Reader &asn1Reader)=0
Read object state from the reader.
Root namespace for all Virgil Security libraries.
Definition: VirgilAsn1Compatible.h:46
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:53
void fromAsn1(const virgil::crypto::VirgilByteArray &asn1)
Restore object state from the ASN.1 structure.
virtual void checkRequiredField(const VirgilByteArray ¶m) const
If given parameter is empty exception will be thrown.
virgil::crypto::VirgilByteArray toAsn1() const
Save object state to the ASN.1 structure.
virtual size_t asn1Write(VirgilAsn1Writer &asn1Writer, size_t childWrittenBytes=0) const =0
Write object state to the writer.