chiark / gitweb /
Multiarch: Move .so's to triplet paths, and declare M-A: same.
[chiark-tcl.git] / crypto / crypto.h
index 82efb6112e58d659fe40130e9ca6ccba45d91b09..13b565437355a60d32662fa69b435755b6bcda5c 100644 (file)
@@ -1,3 +1,27 @@
+/*
+ * 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/>.
+ */
+
+
+#ifndef CRYPTO_H
+#define CRYPTO_H
+
+#include "chiark-tcl.h"
+
 /* from crypto.c */
 
 void memxor(Byte *dest, const Byte *src, int l);
@@ -7,7 +31,7 @@ typedef struct {
   int pad, use_algname;
 } PadOp;
 
-extern Tcl_ObjType blockcipherkey_type;
+extern Tcl_ObjType cht_blockcipherkey_type;
 
 /* from algtables.c */
 
@@ -25,7 +49,7 @@ typedef struct {
   void (*oneshot)(void *digest, const void *data, int len);
 } HashAlgInfo;
 
-extern const HashAlgInfo hashalginfos[];
+extern const HashAlgInfo cht_hashalginfo_entries[];
 
 typedef struct {
   void (*make_schedule)(void *schedule, const void *key, int keylen);
@@ -40,7 +64,7 @@ typedef struct {
   BlockCipherPerDirectionInfo encrypt, decrypt;
 } BlockCipherAlgInfo;
 
-extern const BlockCipherAlgInfo blockcipheralginfos[];
+extern const BlockCipherAlgInfo cht_blockcipheralginfo_entries[];
 
 /* from bcmode.c */
 
@@ -73,5 +97,9 @@ typedef struct {
                     const void *sch);
 } BlockCipherModeInfo;
 
-extern const BlockCipherModeInfo blockciphermodeinfos[];
+extern const IdDataSpec cht_hash_states;
+extern const BlockCipherModeInfo cht_blockciphermodeinfo_entries[];
+
+#include "crypto+tcmdif.h"
 
+#endif /*CRYPTO_H*/