summaryrefslogtreecommitdiff
path: root/keyDerivation.h
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-11-07 19:08:25 +0000
committerErwin Nindl <nine@wirdorange.org>2007-11-07 19:08:25 +0000
commitdd056636dd2cd8c83822ebecfc2448cf8b4b713c (patch)
treee2ca8e3f9565f7da7a7bbbd9a8d9ebd317b2e5b1 /keyDerivation.h
parenti bin da beste deshalb haut des jetzt endlich so hin (diff)
* TunDevice: changed 'char* getTypeString()' to 'const char* getTypeString()'
to fix warning: deprecated conversion from string constant to ‘char*’ * removed libsrtp, use libgcrypt instead now * added buffer funcitons TODO: * fix IV issues * add authentification
Diffstat (limited to 'keyDerivation.h')
-rw-r--r--keyDerivation.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/keyDerivation.h b/keyDerivation.h
index c65df0e..a0c1a01 100644
--- a/keyDerivation.h
+++ b/keyDerivation.h
@@ -36,7 +36,7 @@
extern "C" {
- #include <srtp/crypto_kernel.h>
+ #include <gcrypt.h>
}
@@ -52,16 +52,20 @@ public:
KeyDerivation() : ld_kdr_(-1), cipher_(NULL) {};
virtual ~KeyDerivation() {};
- err_status_t init(Buffer key, Buffer salt);
- err_status_t setLogKDRate(const uint8_t ld_rate);
- err_status_t generate(satp_prf_label label, seq_nr_t seq_nr, Buffer& key, uint32_t length);
- err_status_t clear();
+ void init(Buffer key, Buffer salt);
+ void setLogKDRate(const u_int8_t ld_rate);
+ void generate(satp_prf_label label, seq_nr_t seq_nr, Buffer& key, u_int32_t length);
+ void clear();
+
protected:
int8_t ld_kdr_; // ld(key_derivation_rate)
Buffer salt_;
+ static const char* MIN_GCRYPT_VERSION;
- cipher_t* cipher_;
+ gcry_cipher_hd_t cipher_;
};
+
#endif
+