Virgil Security Crypto library  2.0.7
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:
62  void encrypt(VirgilDataSource& source, VirgilDataSink& sink, bool embedContentInfo = true);
63 
70  void decryptWithKey(
71  VirgilDataSource& source, VirgilDataSink& sink, const VirgilByteArray& recipientId,
72  const VirgilByteArray& privateKey, const VirgilByteArray& privateKeyPassword = VirgilByteArray());
73 
80  void decryptWithPassword(VirgilDataSource& source, VirgilDataSink& sink, const VirgilByteArray& pwd);
81 
82 private:
87  VirgilByteArray tryReadContentInfo(VirgilDataSource& source);
88 
92  void decrypt(
93  VirgilDataSource& source, VirgilDataSink& sink,
95 };
96 
97 }}
98 
99 #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