diff options
author | Erwin Nindl <nine@wirdorange.org> | 2007-12-11 09:43:05 +0000 |
---|---|---|
committer | Erwin Nindl <nine@wirdorange.org> | 2007-12-11 09:43:05 +0000 |
commit | a015651a5d17eee7832199f1266f000292a40ef5 (patch) | |
tree | b895edd61c8a2e9457938fa8d1c1867e3a889274 /keyDerivation.h | |
parent | added syncbuffer (diff) |
added multible precission integer class
key derivation
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_; }; |