summaryrefslogtreecommitdiff
path: root/regtest.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2002-12-06 22:02:46 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2002-12-06 22:02:46 +0000
commita3f0af934e387ba259919f0b72b42120eef3bc5c (patch)
treedf9cff822523331cad30742ddb34056544c7a80d /regtest.cpp
parentf8840dc745d13414205c944b2ffc0796837340f5 (diff)
downloadcryptopp-a3f0af934e387ba259919f0b72b42120eef3bc5c.tar.gz
add script-driven testing
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@24 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'regtest.cpp')
-rw-r--r--regtest.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/regtest.cpp b/regtest.cpp
new file mode 100644
index 0000000..38d80c2
--- /dev/null
+++ b/regtest.cpp
@@ -0,0 +1,34 @@
+#include "factory.h"
+
+#include "dh.h"
+#include "esign.h"
+#include "md2.h"
+#include "trunhash.h"
+#include "rw.h"
+#include "md5.h"
+#include "rsa.h"
+#include "ripemd.h"
+#include "dsa.h"
+
+USING_NAMESPACE(CryptoPP)
+
+void RegisterFactories()
+{
+ RegisterDefaultFactoryFor<SimpleKeyAgreementDomain, DH>("DH");
+ RegisterDefaultFactoryFor<HashTransformation, SHA1>("SHA-1");
+ RegisterDefaultFactoryFor<HashTransformation, SHA256>("SHA-256");
+ RegisterDefaultFactoryFor<HashTransformation, SHA384>("SHA-384");
+ RegisterDefaultFactoryFor<HashTransformation, SHA512>("SHA-512");
+ RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<MD5> >("HMAC(MD5)");
+ RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<SHA1> >("HMAC(SHA-1)");
+ RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<RIPEMD160> >("HMAC(RIPEMD-160)");
+ RegisterPublicKeyCryptoSystemDefaultFactories<RSAES<OAEP<SHA1> > >("RSA/OAEP-MGF1(SHA-1)");
+ RegisterPublicKeyCryptoSystemDefaultFactories<DLIES<> >("DLIES(NoCofactorMultiplication, KDF2(SHA-1), XOR, HMAC(SHA-1), DHAES)");
+ RegisterSignatureSchemeDefaultFactories<DSA>("DSA(1363)");
+ RegisterSignatureSchemeDefaultFactories<NR<SHA1> >("NR(1363)/EMSA1(SHA-1)");
+ RegisterSignatureSchemeDefaultFactories<GDSA<SHA1> >("DSA-1363/EMSA1(SHA-1)");
+ RegisterSignatureSchemeDefaultFactories<RSASSA<PKCS1v15, MD2> >("RSA/PKCS1-1.5(MD2)");
+ RegisterSignatureSchemeDefaultFactories<RSASSA<PKCS1v15, SHA1> >("RSA/PKCS1-1.5(SHA-1)");
+ RegisterSignatureSchemeDefaultFactories<ESIGN<SHA1> >("ESIGN/EMSA5-MGF1(SHA-1)");
+ RegisterSignatureSchemeDefaultFactories<RWSSA<SHA1> >("RW/EMSA2(SHA-1)");
+}