Virgil Security Crypto library  2.1.2
VirgilStreamCipher.h
1 
37 #ifndef VIRGIL_STREAM_CIPHER_H
38 #define VIRGIL_STREAM_CIPHER_H
39 
40 #include <virgil/crypto/VirgilCipherBase.h>
41 
42 #include <virgil/crypto/VirgilByteArray.h>
43 #include <virgil/crypto/VirgilDataSource.h>
44 #include <virgil/crypto/VirgilDataSink.h>
45 
46 namespace virgil { namespace crypto {
47 
52 public:
61  void encrypt(VirgilDataSource& source, VirgilDataSink& sink, bool embedContentInfo = true);
62 
69  void decryptWithKey(
70  VirgilDataSource& source, VirgilDataSink& sink, const VirgilByteArray& recipientId,
71  const VirgilByteArray& privateKey, const VirgilByteArray& privateKeyPassword = VirgilByteArray());
72 
79  void decryptWithPassword(VirgilDataSource& source, VirgilDataSink& sink, const VirgilByteArray& pwd);
80 
81 private:
86  VirgilByteArray tryReadContentInfo(VirgilDataSource& source);
87 
91  void decrypt(
92  VirgilDataSource& source, VirgilDataSink& sink,
94 };
95 
96 }}
97 
98 #endif /* VIRGIL_STREAM_CIPHER_H */
void decryptWithPassword(VirgilDataSource &source, VirgilDataSink &sink, const VirgilByteArray &pwd)
Decrypt data read from given source for recipient defined by password, and write it to the sink...
This is base class for output streams.
Definition: VirgilDataSink.h:49
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
This class provides high-level interface to encrypt / decrypt streaming data using Virgil Security ke...
Definition: VirgilStreamCipher.h:51
Provides symmetric ciphers algorithms.
Definition: VirgilSymmetricCipher.h:52
This is base class for input streams.
Definition: VirgilDataSource.h:49
void encrypt(VirgilDataSource &source, VirgilDataSink &sink, bool embedContentInfo=true)
Encrypt data read from given source and write it the sink.
void decryptWithKey(VirgilDataSource &source, VirgilDataSink &sink, const VirgilByteArray &recipientId, const VirgilByteArray &privateKey, const VirgilByteArray &privateKeyPassword=VirgilByteArray())
Decrypt data read from given source for recipient defined by id and private key, and write it to the ...
This class provides configuration methods to all Virgil*Cipher classes.
Definition: VirgilCipherBase.h:61