chiark / gitweb /
Build-Depends: move tcl-dev to the end, so that we prefer tcl8.4-dev. This is necessa...
[chiark-tcl.git] / crypto / bcmode.c
index e413de72e78677b8af9ff57b91693fc651e405e7..9545af39b6644d2ab533c3e068379b8c13b0e574 100644 (file)
@@ -1,7 +1,23 @@
 /*
+ * crypto - Tcl bindings for parts of the `nettle' crypto library
+ * Copyright 2006-2012 Ian Jackson
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
+
   
-#include "hbytes.h"
+#include "chiark_tcl_crypto.h"
 
 static const char *mode_cbc_encrypt(Byte *data, int blocks,
                                    const Byte *iv, Byte *chain,
@@ -110,7 +126,7 @@ static const char *mode_ctr(Byte *data, int blocks,
   return 0;
 }
 
-const BlockCipherModeInfo blockciphermodeinfos[]= {
+const BlockCipherModeInfo cht_blockciphermodeinfo_entries[]= {
   { "cbc",      1, 2, 1, mode_cbc_encrypt, mode_cbc_decrypt, mode_cbc_mac  },
   { "cbc-mac2", 1, 2, 1, 0,                0,                mode_cbc_mac2 },
   { "ecb",      0, 0, 0, mode_ecb,         mode_ecb,         0             },