X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d4c4fa8efc14b0b5e9bbca41af0e24e652a28d11..29e9a2de0b45893850bbf56ee38e7fd235a6df15:/stglibs/crypto.lib/include/stg/bfstream.h 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;