Virgil Security Crypto library
2.4.6
|
This class provides interface that allow to save and restore object state in the ASN.1 structure. More...
#include <VirgilAsn1Compatible.h>
Public Member Functions | |
virgil::crypto::VirgilByteArray | toAsn1 () const |
Save object state to the ASN.1 structure. | |
void | fromAsn1 (const virgil::crypto::VirgilByteArray &asn1) |
Restore object state from the ASN.1 structure. | |
virtual | ~VirgilAsn1Compatible () noexcept |
Polymorphic destructor. | |
virtual size_t | asn1Write (VirgilAsn1Writer &asn1Writer, size_t childWrittenBytes=0) const =0 |
Write object state to the writer. More... | |
virtual void | asn1Read (VirgilAsn1Reader &asn1Reader)=0 |
Read object state from the reader. More... | |
Protected Member Functions | |
virtual void | checkRequiredField (const VirgilByteArray ¶m) const |
If given parameter is empty exception will be thrown. More... | |
This class provides interface that allow to save and restore object state in the ASN.1 structure.
|
pure virtual |
Read object state from the reader.
asn1Reader | reader payloaded with ASN.1 to be read. |
Implemented in virgil::crypto::foundation::VirgilAsymmetricCipher, virgil::crypto::foundation::VirgilSymmetricCipher, virgil::crypto::foundation::VirgilHash, virgil::crypto::foundation::VirgilPBKDF, virgil::crypto::foundation::VirgilKDF, virgil::crypto::foundation::VirgilPBE, virgil::crypto::foundation::cms::VirgilCMSEnvelopedData, virgil::crypto::foundation::cms::VirgilCMSContent, virgil::crypto::foundation::cms::VirgilCMSKeyTransRecipient, virgil::crypto::foundation::cms::VirgilCMSPasswordRecipient, virgil::crypto::foundation::cms::VirgilCMSContentInfo, virgil::crypto::foundation::cms::VirgilCMSEncryptedContent, virgil::crypto::VirgilCustomParams, and virgil::crypto::VirgilContentInfo.
|
pure virtual |
Write object state to the writer.
asn1Writer | writer that should be payloaded by subclasses. |
childWrittenBytes | count of bytes that was written by subclasses. |
Implemented in virgil::crypto::foundation::VirgilAsymmetricCipher, virgil::crypto::foundation::VirgilSymmetricCipher, virgil::crypto::foundation::VirgilHash, virgil::crypto::foundation::VirgilPBKDF, virgil::crypto::foundation::VirgilKDF, virgil::crypto::foundation::VirgilPBE, virgil::crypto::foundation::cms::VirgilCMSEnvelopedData, virgil::crypto::foundation::cms::VirgilCMSContent, virgil::crypto::foundation::cms::VirgilCMSKeyTransRecipient, virgil::crypto::foundation::cms::VirgilCMSPasswordRecipient, virgil::crypto::foundation::cms::VirgilCMSContentInfo, virgil::crypto::foundation::cms::VirgilCMSEncryptedContent, virgil::crypto::VirgilCustomParams, and virgil::crypto::VirgilContentInfo.
|
protectedvirtual |
If given parameter is empty exception will be thrown.
virgil::crypto::VirgilCryptoException. |