Virgil Security Crypto library  2.4.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
VirgilDataSink.h
1 
37 #ifndef VIRGIL_CRYPTO_VIRGIL_DATA_SINK_H
38 #define VIRGIL_CRYPTO_VIRGIL_DATA_SINK_H
39 
40 #include "VirgilByteArray.h"
41 
42 namespace virgil { namespace crypto {
43 
50 public:
54  virtual bool isGood() = 0;
55 
60  virtual void write(const VirgilByteArray& data) = 0;
61 
70  static void safeWrite(VirgilDataSink& sink, const VirgilByteArray& data);
71 
72  virtual ~VirgilDataSink() noexcept = default;
73 };
74 
75 }}
76 
77 #endif /* VIRGIL_CRYPTO_VIRGIL_DATA_SINK_H */
virtual void write(const VirgilByteArray &data)=0
Write data to the target object.
This is base class for output streams.
Definition: VirgilDataSink.h:49
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:50
virtual bool isGood()=0
Return true if target object is able to write data.
static void safeWrite(VirgilDataSink &sink, const VirgilByteArray &data)
Write data to the sink in a safe way.