Virgil Security Crypto library  2.6.3
VirgilStreamCipher.h
1 
37 #ifndef VIRGIL_STREAM_CIPHER_H
38 #define VIRGIL_STREAM_CIPHER_H
39 
40 #include "VirgilCipherBase.h"
41 
42 #include "VirgilByteArray.h"
43 #include "VirgilDataSource.h"
44 #include "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(VirgilDataSource& source, VirgilDataSink& sink);
92 };
93 
94 }}
95 
96 #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:50
This class provides high-level interface to encrypt / decrypt streaming data using Virgil Security ke...
Definition: VirgilStreamCipher.h:51
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