X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d4c4fa8efc14b0b5e9bbca41af0e24e652a28d11..6e9c03d53920b4c53c9b93303ae676be0f100585:/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..ae955b94 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;