From 261c9067380c5311c98e3576540eee6015be3297 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 17 Jun 2007 22:25:20 +0000 Subject: added [] - operator to Buffer const Buffers are now possible --- cypher.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'cypher.cpp') diff --git a/cypher.cpp b/cypher.cpp index 8711862..58b433f 100644 --- a/cypher.cpp +++ b/cypher.cpp @@ -28,6 +28,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #include "datatypes.h" #include "cypher.h" @@ -35,16 +37,19 @@ void Cypher::cypher(Buffer& buf) { Buffer stream = getBitStream(buf.getLength()); - calc(buf, stream, buf.getLength()); + exor(buf, stream); } -void Cypher::calc(u_int8_t* buf, u_int8_t* bit_stream, u_int32_t length) +void Cypher::exor(Buffer& buf, const Buffer& bit_stream) { - for(u_int32_t i; i