aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-28 16:02:30 +0000
committerlloyd <[email protected]>2008-09-28 16:02:30 +0000
commit6edc83ddef93bddf70f1b259d80b104bf14524c2 (patch)
tree7760b7e958f6f1128a9d628612d5b177a8a78d64 /src
parent81fd04cb08fee55dfcbb847a8b94999e0927033e (diff)
Rename header guards in modules from BOTAN_EXT_ to BOTAN_ for consistency
Diffstat (limited to 'src')
-rw-r--r--src/adler32.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/adler32.cpp b/src/adler32.cpp
deleted file mode 100644
index b808e3e67..000000000
--- a/src/adler32.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*************************************************
-* Adler32 Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#include <botan/adler32.h>
-#include <botan/loadstor.h>
-
-namespace Botan {
-
-/*************************************************
-* Adler32 Checksum *
-*************************************************/
-void Adler32::hash(const byte input[], u32bit length)
- {
- u32bit S1x = S1, S2x = S2;
- while(length >= 16)
- {
- S1x += input[ 0]; S2x += S1x;
- S1x += input[ 1]; S2x += S1x;
- S1x += input[ 2]; S2x += S1x;
- S1x += input[ 3]; S2x += S1x;
- S1x += input[ 4]; S2x += S1x;
- S1x += input[ 5]; S2x += S1x;
- S1x += input[ 6]; S2x += S1x;
- S1x += input[ 7]; S2x += S1x;
- S1x += input[ 8]; S2x += S1x;
- S1x += input[ 9]; S2x += S1x;
- S1x += input[10]; S2x += S1x;
- S1x += input[11]; S2x += S1x;
- S1x += input[12]; S2x += S1x;
- S1x += input[13]; S2x += S1x;
- S1x += input[14]; S2x += S1x;
- S1x += input[15]; S2x += S1x;
- input += 16;
- length -= 16;
- }
- for(u32bit j = 0; j != length; ++j)
- {
- S1x += input[j]; S2x += S1x;
- }
- S1x %= 65521;
- S2x %= 65521;
- S1 = S1x;
- S2 = S2x;
- }
-
-/*************************************************
-* Update an Adler32 Checksum *
-*************************************************/
-void Adler32::add_data(const byte input[], u32bit length)
- {
- const u32bit PROCESS_AMOUNT = 5552;
- while(length >= PROCESS_AMOUNT)
- {
- hash(input, PROCESS_AMOUNT);
- input += PROCESS_AMOUNT;
- length -= PROCESS_AMOUNT;
- }
- hash(input, length);
- }
-
-/*************************************************
-* Finalize an Adler32 Checksum *
-*************************************************/
-void Adler32::final_result(byte output[])
- {
- store_be(output, S2, S1);
- clear();
- }
-
-}