diff options
Diffstat (limited to 'keyDerivation.h')
-rw-r--r-- | keyDerivation.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/keyDerivation.h b/keyDerivation.h index d155934..f7a4068 100644 --- a/keyDerivation.h +++ b/keyDerivation.h @@ -33,17 +33,14 @@ #include "datatypes.h" #include "buffer.h" +#include "threadUtils.hpp" #include "syncBuffer.h" +#include <gcrypt.h> #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> -extern "C" { - #include <gcrypt.h> -} - - typedef enum { label_satp_encryption = 0x00, label_satp_msg_auth = 0x01, @@ -54,7 +51,7 @@ typedef enum { class KeyDerivation { public: - KeyDerivation() : ld_kdr_(-1), cipher_(NULL), initialized_(false) {}; + KeyDerivation() : ld_kdr_(-1), cipher_(NULL) {}; virtual ~KeyDerivation() {}; void init(Buffer key, Buffer salt); @@ -71,7 +68,7 @@ protected: static const char* MIN_GCRYPT_VERSION; gcry_cipher_hd_t cipher_; - bool initialized_; + Mutex mutex_; }; |