diff options
author | Erwin Nindl <nine@wirdorange.org> | 2007-08-23 16:29:13 +0000 |
---|---|---|
committer | Erwin Nindl <nine@wirdorange.org> | 2007-08-23 16:29:13 +0000 |
commit | 23829340df43d8bb3b988acf05c522dca0261498 (patch) | |
tree | c1cec1ad5c90ffa9a1e29a6d773d9ca13b1f2fea /cypher.h | |
parent | changed keyderivation fuction from 'aes_icm_output' to 'cipher_output' (diff) |
* added KeyDerivation to anytun.cpp
* code cleanup
Diffstat (limited to 'cypher.h')
-rw-r--r-- | cypher.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -40,7 +40,9 @@ class Cypher public: Cypher() {}; virtual ~Cypher() {}; - + + void setKey(Buffer key) {}; + void setSalt(Buffer salt) {}; void cypher(Buffer& buf, seq_nr_t seq_nr, sender_id_t sender_id); protected: @@ -57,13 +59,17 @@ protected: class AesIcmCypher : public Cypher { public: -// AesIcmCypher() {}; -// ~AesIcmCypher() {}; + AesIcmCypher() : key_(Buffer(0)), salt_(Buffer(14)) {}; + void setKey(Buffer key); + void setSalt(Buffer salt); void cypher(Buffer& buf, seq_nr_t seq_nr, sender_id_t sender_id); protected: Buffer getBitStream(u_int32_t length, seq_nr_t seq_nr, sender_id_t sender_id) { return Buffer(); }; +private: + Buffer key_; + Buffer salt_; // size: 112 bit }; #endif |