X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d4c4fa8efc14b0b5e9bbca41af0e24e652a28d11..0fdb3f546ec7cb206f664f5240ac6ba3e52e8832:/stglibs/crypto.lib/include/stg/bfstream.h?ds=sidebyside diff --git a/stglibs/crypto.lib/include/stg/bfstream.h b/stglibs/crypto.lib/include/stg/bfstream.h index 41b44330..bead8d00 100644 --- a/stglibs/crypto.lib/include/stg/bfstream.h +++ b/stglibs/crypto.lib/include/stg/bfstream.h @@ -10,12 +10,14 @@ namespace STG class ENCRYPT_STREAM { public: - typedef void (* CALLBACK)(const void * block, size_t size, void * data); + typedef bool (* CALLBACK)(const void * block, size_t size, void * data); ENCRYPT_STREAM(const std::string & key, CALLBACK callback, void * data); ~ENCRYPT_STREAM(); void Put(const void * data, size_t size, bool last = false); + bool isOk() const; + private: class IMPL; @@ -25,12 +27,14 @@ class ENCRYPT_STREAM class DECRYPT_STREAM { public: - typedef void (* CALLBACK)(const void * block, size_t size, void * data); + typedef bool (* CALLBACK)(const void * block, size_t size, void * data); DECRYPT_STREAM(const std::string & key, CALLBACK callback, void * data); ~DECRYPT_STREAM(); void Put(const void * data, size_t size, bool last = false); + bool isOk() const; + private: class IMPL;