Virgil Security Crypto library  2.6.3
VirgilBytesDataSource.h
1 
37 #ifndef VIRGIL_CRYPTO_VIRGIL_BYTES_DATA_SOURCE_H
38 #define VIRGIL_CRYPTO_VIRGIL_BYTES_DATA_SOURCE_H
39 
40 #include "../VirgilByteArray.h"
41 #include "../VirgilDataSource.h"
42 
43 namespace virgil { namespace crypto { namespace stream {
44 
51 public:
58  explicit VirgilBytesDataSource(const virgil::crypto::VirgilByteArray& in, size_t chunkSize = 1);
59 
63  virtual ~VirgilBytesDataSource() noexcept;
64 
68  virtual bool hasData();
69 
74 
80  virtual void reset();
81 
82 private:
84  const size_t chunkSize_;
85  size_t leftBytes_;
86 };
87 
88 }}}
89 
90 #endif /* VIRGIL_CRYPTO_VIRGIL_BYTES_DATA_SOURCE_H */
virtual ~VirgilBytesDataSource() noexcept
Polymorphic destructor.
virtual virgil::crypto::VirgilByteArray read()
Overriding of VirgilDataSource::read() method.
C++ Byte Array implementation of the VirgilDataSource class.
Definition: VirgilBytesDataSource.h:50
virtual bool hasData()
Overriding of VirgilDataSource::hasData() method.
virtual void reset()
Reset internal state to initial.
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 is base class for input streams.
Definition: VirgilDataSource.h:49
VirgilBytesDataSource(const virgil::crypto::VirgilByteArray &in, size_t chunkSize=1)
Creates data sink based on byte array.