aboutsummaryrefslogtreecommitdiffstats
path: root/include/tiger.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-05-18 18:33:19 +0000
committerlloyd <[email protected]>2006-05-18 18:33:19 +0000
commita2c99d3270eb73ef2db5704fc54356c6b75096f8 (patch)
treead3d6c4fcc8dd0f403f8105598943616246fe172 /include/tiger.h
Initial checkin1.5.6
Diffstat (limited to 'include/tiger.h')
-rw-r--r--include/tiger.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/tiger.h b/include/tiger.h
new file mode 100644
index 000000000..26837e20e
--- /dev/null
+++ b/include/tiger.h
@@ -0,0 +1,38 @@
+/*************************************************
+* Tiger Header File *
+* (C) 1999-2006 The Botan Project *
+*************************************************/
+
+#ifndef BOTAN_TIGER_H__
+#define BOTAN_TIGER_H__
+
+#include <botan/mdx_hash.h>
+
+namespace Botan {
+
+/*************************************************
+* Tiger *
+*************************************************/
+class Tiger : public MDx_HashFunction
+ {
+ public:
+ void clear() throw();
+ std::string name() const;
+ HashFunction* clone() const { return new Tiger(OUTPUT_LENGTH); }
+ Tiger(u32bit = 24, u32bit = 3);
+ private:
+ void hash(const byte[]);
+ void copy_out(byte[]);
+
+ static void pass(u64bit&, u64bit&, u64bit&, u64bit[8], byte);
+ static void mix(u64bit[8]);
+ static void round(u64bit&, u64bit&, u64bit&, u64bit, byte);
+ static const u64bit SBOX1[256], SBOX2[256], SBOX3[256], SBOX4[256];
+ SecureBuffer<u64bit, 8> X;
+ SecureBuffer<u64bit, 3> digest;
+ const u32bit PASS;
+ };
+
+}
+
+#endif