util-vserver 0.30.215.
[util-vserver.git] / src / testsuite / hashcalc.c
index 3b84e95..dac9148 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: hashcalc.c 2209 2005-10-29 10:33:02Z ensc $    --*- c -*--
+// $Id: hashcalc.c 2685 2008-02-21 23:22:23Z ensc $    --*- c -*--
 
 // Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -39,17 +39,18 @@ int main(int UNUSED argc, char *argv[])
       volatile unsigned int    canary2;
       volatile unsigned int    canary3;
   } __attribute__((__packed__))        d_path;
-
   d_path.canary0 = 0x12345678;
   d_path.canary1 = 0x21436587;
   d_path.canary2 = 0x89abcdef;
   d_path.canary3 = 0x98badcfe;
   memset(d_path.d, 0x66, sizeof d_path.d);
 
-  global_info.hash_conf.method = hashFunctionFind(argv[2]);
+  ensc_crypto_init();
+  global_info.hash_conf.method = ensc_crypto_hash_find(argv[2]);
   
-  assert(hashFunctionContextInit(&global_info.hash_context,
-                                global_info.hash_conf.method)!=-1);
+  assert(ensc_crypto_hashctx_init(&global_info.hash_context,
+                                 global_info.hash_conf.method)!=-1);
 
   assert(fstat(fd, &st)!=-1);
 
@@ -68,7 +69,7 @@ int main(int UNUSED argc, char *argv[])
   Vwrite(1, d_path.d, strlen(d_path.d));
   Vwrite(1, "\n", 1);
   
-  hashFunctionContextFree(&global_info.hash_context);
+  ensc_crypto_hashctx_free(&global_info.hash_context);
   
   return 0;
 }