| 
    Virgil Security Crypto library
    2.4.6
    
   | 
 
#include <VirgilContentInfo.h>
  
 Public Member Functions | |
| VirgilContentInfo () | |
| PIMPL initialization.  | |
VirgilAsn1Compatible implementation  | |
Marshalling format: 
    VirgilContentInfo ::= SEQUENCE { 
        version ::= INTEGER { v0(0) }, 
        cmsContent ContentInfo, -- Imports from RFC 5652 
        customParams [0] IMPLICIT VirgilCustomParams OPTIONAL 
    } 
 | |
| size_t | asn1Write (virgil::crypto::foundation::asn1::VirgilAsn1Writer &asn1Writer, size_t childWrittenBytes=0) const override | 
| Write object state to the writer.  More... | |
| void | asn1Read (virgil::crypto::foundation::asn1::VirgilAsn1Reader &asn1Reader) override | 
| Read object state from the reader.  More... | |
Recipient management  | |
| void | addKeyRecipient (const VirgilByteArray &recipientId, const VirgilByteArray &publicKey) | 
| Add recipient defined with id and public key.  More... | |
| bool | hasKeyRecipient (const VirgilByteArray &recipientId) const | 
| Check whether recipient with given identifier exists.  More... | |
| void | removeKeyRecipient (const VirgilByteArray &recipientId) | 
| Remove recipient with given identifier.  More... | |
| void | removeKeyRecipients () | 
| Remove all recipients defined with identifier.  | |
| void | addPasswordRecipient (const VirgilByteArray &pwd) | 
| Add recipient defined with password.  More... | |
| bool | hasPasswordRecipient (const VirgilByteArray &password) const | 
| Check whether recipient with given password exists.  More... | |
| void | removePasswordRecipient (const VirgilByteArray &pwd) | 
| Remove recipient with given password.  More... | |
| void | removePasswordRecipients () | 
| Remove all recipients defined with password.  | |
| void | removeAllRecipients () | 
| Remove all recipients.  | |
Custom parameters Access / Management  | |
Custom parameters is a structure that contains additional user defined information about encrypted data. 
  | |
| VirgilCustomParams & | customParams () | 
| Provide access to the object that handles custom parameters.  More... | |
| const VirgilCustomParams & | customParams () const | 
| Provide readonly access to the object that handles custom parameters.  More... | |
  Public Member Functions inherited from virgil::crypto::foundation::asn1::VirgilAsn1Compatible | |
| 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.  | |
Static Public Member Functions | |
Helpers  | |
| static size_t | defineSize (const VirgilByteArray &contentInfoData) | 
Encrypted content management | |
  | |
| class | VirgilCipherBase | 
Additional Inherited Members | |
  Protected Member Functions inherited from virgil::crypto::foundation::asn1::VirgilAsn1Compatible | |
| virtual void | checkRequiredField (const VirgilByteArray ¶m) const | 
| If given parameter is empty exception will be thrown.  More... | |
High level API to the VirgilContentInfo structure.
| void virgil::crypto::VirgilContentInfo::addKeyRecipient | ( | const VirgilByteArray & | recipientId, | 
| const VirgilByteArray & | publicKey | ||
| ) | 
Add recipient defined with id and public key.
| recipientId | Recipient's unique identifier, MUST not be empty. | 
| publicKey | Recipient's public key, MUST not be empty. | 
| VirgilCryptoException | with VirgilCryptoErrorCode::InvalidArgument, if invalid arguments are given. | 
| void virgil::crypto::VirgilContentInfo::addPasswordRecipient | ( | const VirgilByteArray & | pwd | ) | 
Add recipient defined with password.
Use it for password based encryption.
| pwd | Recipient's password, MUST not be empty. | 
| VirgilCryptoException | with VirgilCryptoErrorCode::InvalidArgument, if empty argument are given. | 
      
  | 
  overridevirtual | 
Read object state from the reader.
| asn1Reader | reader payloaded with ASN.1 to be read. | 
Implements virgil::crypto::foundation::asn1::VirgilAsn1Compatible.
      
  | 
  overridevirtual | 
Write object state to the writer.
| asn1Writer | writer that should be payloaded by subclasses. | 
| childWrittenBytes | count of bytes that was written by subclasses. | 
Implements virgil::crypto::foundation::asn1::VirgilAsn1Compatible.
| VirgilCustomParams& virgil::crypto::VirgilContentInfo::customParams | ( | ) | 
Provide access to the object that handles custom parameters.
| const VirgilCustomParams& virgil::crypto::VirgilContentInfo::customParams | ( | ) | const | 
Provide readonly access to the object that handles custom parameters.
| bool virgil::crypto::VirgilContentInfo::hasKeyRecipient | ( | const VirgilByteArray & | recipientId | ) | const | 
Check whether recipient with given identifier exists.
Search order:
| recipientId | Recipient's unique identifier. | 
| bool virgil::crypto::VirgilContentInfo::hasPasswordRecipient | ( | const VirgilByteArray & | password | ) | const | 
Check whether recipient with given password exists.
Search order:
| password | Recipient's unique identifier. | 
| void virgil::crypto::VirgilContentInfo::removeKeyRecipient | ( | const VirgilByteArray & | recipientId | ) | 
Remove recipient with given identifier.
| recipientId | Recipient's unique identifier. | 
| void virgil::crypto::VirgilContentInfo::removePasswordRecipient | ( | const VirgilByteArray & | pwd | ) | 
Remove recipient with given password.
 1.8.6