37 #ifndef VIRGIL_CRYPTO_CONTENT_INFO_H 38 #define VIRGIL_CRYPTO_CONTENT_INFO_H 40 #include "VirgilCustomParams.h" 41 #include "foundation/asn1/VirgilAsn1Compatible.h" 46 namespace virgil {
namespace crypto {
67 size_t childWrittenBytes = 0)
const override;
201 struct EncryptionResult {
206 void encryptKeyRecipients(std::function<EncryptionResult(
const VirgilByteArray& publicKey)> encrypt);
208 void encryptPasswordRecipients(std::function<EncryptionResult(
const VirgilByteArray& pwd)> encrypt);
210 void setContentEncryptionAlgorithm(
const VirgilByteArray& contentEncryptionAlgorithm);
214 bool isReadyForEncryption();
216 bool isReadyForDecryption();
233 std::unique_ptr<Impl> impl_;
238 #endif //VIRGIL_CRYPTO_CONTENT_INFO_H void asn1Read(virgil::crypto::foundation::asn1::VirgilAsn1Reader &asn1Reader) override
Read object state from the reader.
Data object that represent ASN.1 structure: VirgilCustomParams.
Definition: VirgilCustomParams.h:51
This class provides methods for reading ASN.1 data structure.
Definition: VirgilAsn1Reader.h:53
void removeKeyRecipients()
Remove all recipients defined with identifier.
void removePasswordRecipients()
Remove all recipients defined with password.
This class provides interface that allow to save and restore object state in the ASN.1 structure.
Definition: VirgilAsn1Compatible.h:59
size_t asn1Write(virgil::crypto::foundation::asn1::VirgilAsn1Writer &asn1Writer, size_t childWrittenBytes=0) const override
Write object state to the writer.
Definition: VirgilContentInfo.h:51
This class provides methods for writing ASN.1 data structure.
Definition: VirgilAsn1Writer.h:54
VirgilContentInfo()
PIMPL initialization.
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:50
void removePasswordRecipient(const VirgilByteArray &pwd)
Remove recipient with given password.
VirgilCustomParams & customParams()
Provide access to the object that handles custom parameters.
bool hasPasswordRecipient(const VirgilByteArray &password) const
Check whether recipient with given password exists.
void removeKeyRecipient(const VirgilByteArray &recipientId)
Remove recipient with given identifier.
bool hasKeyRecipient(const VirgilByteArray &recipientId) const
Check whether recipient with given identifier exists.
void addPasswordRecipient(const VirgilByteArray &pwd)
Add recipient defined with password.
void addKeyRecipient(const VirgilByteArray &recipientId, const VirgilByteArray &publicKey)
Add recipient defined with id and public key.
void removeAllRecipients()
Remove all recipients.
This class provides configuration methods to all Virgil*Cipher classes.
Definition: VirgilCipherBase.h:61