aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/xor_buf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/xor_buf.cpp')
-rw-r--r--src/utils/xor_buf.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/utils/xor_buf.cpp b/src/utils/xor_buf.cpp
deleted file mode 100644
index 779be81c3..000000000
--- a/src/utils/xor_buf.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
-* XOR operations
-* (C) 1999-2008 Jack Lloyd
-*/
-
-#include <botan/xor_buf.h>
-#include <botan/loadstor.h>
-
-namespace Botan {
-
-/**
-* Xor values into buffer
-*/
-u32bit xor_into_buf(byte buf[], u32bit buf_i, u32bit length,
- const void* in_void, u32bit in_len)
- {
- const byte* in = static_cast<const byte*>(in_void);
-
- byte last = 0;
- byte count = 0;
-
- for(u32bit i = 0; i != in_len; ++i)
- {
- if(in[i] != last)
- {
- buf[buf_i] ^= last;
- buf_i = (buf_i + 1) % length;
-
- buf[buf_i] ^= count;
- buf_i = (buf_i + 1) % length;
-
- last = in[i];
- count = 1;
- }
- else
- ++count;
- }
-
- // final values of last, count are thrown away
-
- return buf_i;
- }
-
-}