Virgil Security Crypto library  2.0.7
VirgilStreamDataSource.h
1 
37 #ifndef VIRGIL_CRYPTO_VIRGIL_STREAM_DATA_SOURCE_H
38 #define VIRGIL_CRYPTO_VIRGIL_STREAM_DATA_SOURCE_H
39 
40 #include <istream>
41 
42 #include <virgil/crypto/VirgilByteArray.h>
43 #include <virgil/crypto/VirgilDataSource.h>
44 
45 namespace virgil { namespace crypto { namespace stream {
46 
53 public:
60  explicit VirgilStreamDataSource(std::istream& in, size_t chunkSize = 4096);
61 
65  virtual ~VirgilStreamDataSource() noexcept;
66 
70  virtual bool hasData();
71 
76 
77 private:
78  std::istream& in_;
79  size_t chunkSize_;
80 };
81 
82 }}}
83 
84 #endif /* VIRGIL_CRYPTO_VIRGIL_STREAM_DATA_SOURCE_H */
virtual bool hasData()
Overriding of VirgilDataSource::hasData() method.
virtual ~VirgilStreamDataSource() noexcept
Polymorphic destructor.
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
virtual virgil::crypto::VirgilByteArray read()
Overriding of VirgilDataSource::read() method.
This is base class for input streams.
Definition: VirgilDataSource.h:49
VirgilStreamDataSource(std::istream &in, size_t chunkSize=4096)
Creates data sink based on std::istream object.
C++ stream implementation of the VirgilDataSource class.
Definition: VirgilStreamDataSource.h:52