aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/ia32_eng
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-11 19:20:32 +0000
committerlloyd <[email protected]>2008-11-11 19:20:32 +0000
commit2af6c4499013911d7b01ce3ce1acc5aa8fef15ab (patch)
tree894612d39bbcd50187334c1bedf197c4475c7393 /src/engine/ia32_eng
parent25d7b7aa9e9896df45f12fa59db4c44411bc21f0 (diff)
Move most of the remaining libstate code to pk_engine.cpp, move engines
back to the toplevel since most othe dependencies have been removed now (except get_cipher which still needs changes)
Diffstat (limited to 'src/engine/ia32_eng')
-rw-r--r--src/engine/ia32_eng/eng_ia32.cpp60
-rw-r--r--src/engine/ia32_eng/eng_ia32.h27
-rw-r--r--src/engine/ia32_eng/info.txt14
3 files changed, 101 insertions, 0 deletions
diff --git a/src/engine/ia32_eng/eng_ia32.cpp b/src/engine/ia32_eng/eng_ia32.cpp
new file mode 100644
index 000000000..0378c094e
--- /dev/null
+++ b/src/engine/ia32_eng/eng_ia32.cpp
@@ -0,0 +1,60 @@
+/*************************************************
+* Assembly Implementation Engine Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#include <botan/eng_ia32.h>
+
+#if defined(BOTAN_HAS_SERPENT_IA32)
+ #include <botan/serp_ia32.h>
+#endif
+
+#if defined(BOTAN_HAS_MD4_IA32)
+ #include <botan/md4_ia32.h>
+#endif
+
+#if defined(BOTAN_HAS_MD5_IA32)
+ #include <botan/md5_ia32.h>
+#endif
+
+#if defined(BOTAN_HAS_SHA1_IA32)
+ #include <botan/sha1_ia32.h>
+#endif
+
+namespace Botan {
+
+BlockCipher*
+IA32_Assembler_Engine::find_block_cipher(const SCAN_Name& request,
+ Algorithm_Factory&) const
+ {
+#if defined(BOTAN_HAS_SERPENT_IA32)
+ if(request.algo_name() == "Serpent")
+ return new Serpent_IA32;
+#endif
+
+ return 0;
+ }
+
+HashFunction*
+IA32_Assembler_Engine::find_hash(const SCAN_Name& request,
+ Algorithm_Factory&) const
+ {
+#if defined(BOTAN_HAS_MD4_IA32)
+ if(request.algo_name() == "MD4")
+ return new MD4_IA32;
+#endif
+
+#if defined(BOTAN_HAS_MD5_IA32)
+ if(request.algo_name() == "MD5")
+ return new MD5_IA32;
+#endif
+
+#if defined(BOTAN_HAS_SHA1_IA32)
+ if(request.algo_name() == "SHA-160")
+ return new SHA_160_IA32;
+#endif
+
+ return 0;
+ }
+
+}
diff --git a/src/engine/ia32_eng/eng_ia32.h b/src/engine/ia32_eng/eng_ia32.h
new file mode 100644
index 000000000..587728f2f
--- /dev/null
+++ b/src/engine/ia32_eng/eng_ia32.h
@@ -0,0 +1,27 @@
+/**
+* IA-32 Assembly Implementation Engines
+* (C) 1999-2008 Jack Lloyd
+*/
+
+#ifndef BOTAN_IA32_ASM_ENGINE_H__
+#define BOTAN_IA32_ASM_ENGINE_H__
+
+#include <botan/engine.h>
+
+namespace Botan {
+
+class BOTAN_DLL IA32_Assembler_Engine : public Engine
+ {
+ public:
+ std::string provider_name() const { return "ia32"; }
+ private:
+ BlockCipher* find_block_cipher(const SCAN_Name&,
+ Algorithm_Factory&) const;
+
+ HashFunction* find_hash(const SCAN_Name& reqeust,
+ Algorithm_Factory&) const;
+ };
+
+}
+
+#endif
diff --git a/src/engine/ia32_eng/info.txt b/src/engine/ia32_eng/info.txt
new file mode 100644
index 000000000..b9e3bddd5
--- /dev/null
+++ b/src/engine/ia32_eng/info.txt
@@ -0,0 +1,14 @@
+realname "IA32 Assembler Engine"
+
+define ENGINE_IA32_ASSEMBLER
+
+load_on auto
+
+<add>
+eng_ia32.cpp
+eng_ia32.h
+</add>
+
+<arch>
+ia32
+</arch>