X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/27fd26be047af5ccd9d023cf0134fcbf272f18cd..11db4a3e1d499a2e2da4cf312db1655eb0f055fc:/stglibs/crypto.lib/include/stg/bfstream.h?ds=inline 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;