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 {
64 virgil::crypto::VirgilByteArray
toAsn1()
const;
69 void fromAsn1(
const virgil::crypto::VirgilByteArray& asn1);
95 virtual void checkAsn1ParamNotEmpty(
const virgil::crypto::VirgilByteArray& param,
const char* paramName = 0)
const;
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 void asn1Read(VirgilAsn1Reader &asn1Reader)=0
Read object state from the reader.
Definition: VirgilAsn1Compatible.h:46
virtual void checkAsn1ParamNotEmpty(const virgil::crypto::VirgilByteArray ¶m, const char *paramName=0) const
If given parameter is empty exception will be thrown.
void fromAsn1(const virgil::crypto::VirgilByteArray &asn1)
Restore object state from the ASN.1 structure.
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.
virtual ~VirgilAsn1Compatible()
Polymorphic destructor.
Definition: VirgilAsn1Compatible.h:74