Link libgnunetblockgroup to libgnunetblock
[oweals/gnunet.git] / src / util / test_crypto_symmetric.c
index 90214a4b53d10fc3927d4a1db1c81850e668d5a1..b2fdd07c31d59b860fb4dcc48db4cf1c1731aa61 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2002, 2003, 2004, 2006 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2002, 2003, 2004, 2006 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 
 */
 /**
@@ -95,21 +95,22 @@ verifyCrypto ()
   };
   unsigned char encrresult[] =
   {
-    161, 152, 186, 231, 214, 55, 225, 206, 85, 43, 80, 134, 145, 198, 20, 
-    233, 236, 57, 194, 10, 147, 149, 30, 106, 179, 54, 182, 247, 71, 204, 
-    179, 51, 1
+    155, 88, 106, 174, 124, 172, 47, 149, 85, 15, 208, 176, 65, 124, 155,
+    74, 215, 25, 177, 231, 162, 109, 165, 4, 133, 165, 93, 44, 213, 77,
+    206, 204, 1
   };
 
   res = NULL;
   ret = 0;
 
-  memcpy (key.aes_key, raw_key_aes, GNUNET_CRYPTO_AES_KEY_LENGTH);
-  memcpy (key.twofish_key, raw_key_twofish, GNUNET_CRYPTO_AES_KEY_LENGTH);
+  GNUNET_memcpy (key.aes_key, raw_key_aes, GNUNET_CRYPTO_AES_KEY_LENGTH);
+  GNUNET_memcpy (key.twofish_key, raw_key_twofish, GNUNET_CRYPTO_AES_KEY_LENGTH);
   if (GNUNET_CRYPTO_AES_KEY_LENGTH !=
       GNUNET_CRYPTO_symmetric_encrypt (plain, GNUNET_CRYPTO_AES_KEY_LENGTH, &key,
-                                 (const struct
-                                  GNUNET_CRYPTO_SymmetricInitializationVector *)
-                                 "testtesttesttest", result))
+                                       (const struct
+                                        GNUNET_CRYPTO_SymmetricInitializationVector *)
+                                       "testtesttesttesttesttesttesttest",
+                                       result))
   {
     printf ("Wrong return value from encrypt block.\n");
     ret = 1;
@@ -131,7 +132,7 @@ verifyCrypto ()
       GNUNET_CRYPTO_symmetric_decrypt (result, GNUNET_CRYPTO_AES_KEY_LENGTH, &key,
                                  (const struct
                                   GNUNET_CRYPTO_SymmetricInitializationVector *)
-                                 "testtesttesttest", res))
+                                 "testtesttesttesttesttesttesttest", res))
   {
     printf ("Wrong return value from decrypt block.\n");
     ret = 1;