summaryrefslogtreecommitdiff
path: root/cypher.h
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-08-23 16:29:13 +0000
committerErwin Nindl <nine@wirdorange.org>2007-08-23 16:29:13 +0000
commit23829340df43d8bb3b988acf05c522dca0261498 (patch)
treec1cec1ad5c90ffa9a1e29a6d773d9ca13b1f2fea /cypher.h
parentchanged 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.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/cypher.h b/cypher.h
index 30147a1..1df207f 100644
--- a/cypher.h
+++ b/cypher.h
@@ -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