From 00febb25de92b1cd01309cc0f253ed4c3a761b13 Mon Sep 17 00:00:00 2001 From: Erwin Nindl Date: Mon, 24 Dec 2007 17:05:26 +0000 Subject: weihnachtlicher checkin * packet processing now with less memory operations than before * todo: * testing * set cipher / authalgo via commandline * set key operations for hmac calculation --- cypher.cpp | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) (limited to 'cypher.cpp') diff --git a/cypher.cpp b/cypher.cpp index 58b971c..9661428 100644 --- a/cypher.cpp +++ b/cypher.cpp @@ -35,36 +35,21 @@ #include #include "cypher.h" -#include "keyDerivation.h" #include "mpi.h" #include "log.h" -void Cypher::cypher(Buffer& buf, seq_nr_t seq_nr, sender_id_t sender_id) -{ - Buffer stream = getBitStream(buf.getLength(), seq_nr, sender_id); - exor(buf, stream); -} - -void Cypher::exor(Buffer& buf, const Buffer& bit_stream) +void NullCypher::cypher(Buffer& out, Buffer& in, u_int32_t length, seq_nr_t seq_nr, sender_id_t sender_id) { try { - for(u_int32_t i; i