diff demos/test/dh_tests.c @ 143:5d99163f7e32 libtomcrypt-orig

import of libtomcrypt 0.99
author Matt Johnston <matt@ucc.asn.au>
date Sun, 19 Dec 2004 11:34:45 +0000
parents 6362d3854bb4
children
line wrap: on
line diff
--- a/demos/test/dh_tests.c	Tue Jun 15 14:07:21 2004 +0000
+++ b/demos/test/dh_tests.c	Sun Dec 19 11:34:45 2004 +0000
@@ -1,5 +1,7 @@
 #include "test.h"
 
+#ifdef MDH
+
 int dh_tests (void)
 {
   unsigned char buf[3][4096];
@@ -10,8 +12,8 @@
   DO(dh_test());
 
   /* make up two keys */
-  DO(dh_make_key (&test_yarrow, find_prng ("yarrow"), 96, &usera));
-  DO(dh_make_key (&test_yarrow, find_prng ("yarrow"), 96, &userb));
+  DO(dh_make_key (&test_yarrow, find_prng ("yarrow"), 512, &usera));
+  DO(dh_make_key (&test_yarrow, find_prng ("yarrow"), 512, &userb));
 
   /* make the shared secret */
   x = 4096;
@@ -50,7 +52,7 @@
   dh_free (&userb);
 
 /* test encrypt_key */
-  dh_make_key (&test_yarrow, find_prng ("yarrow"), 128, &usera);
+  dh_make_key (&test_yarrow, find_prng ("yarrow"), 512, &usera);
   for (x = 0; x < 16; x++) {
     buf[0][x] = x;
   }
@@ -85,3 +87,13 @@
   dh_free (&usera);
   return 0;
 }
+
+#else
+
+int dh_tests(void)
+{
+   printf("NOP");
+   return 0;
+}
+
+#endif