X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=crypto%2Fcrypto.h;h=0028edbad25333a3cb78a73e64bd534bdcd1bdfd;hb=ca8b96bf81245f21fe3906c71dc2994bfc5e516f;hp=82efb6112e58d659fe40130e9ca6ccba45d91b09;hpb=da1c2c3cbb87a600f19e250f93ef9fa4f89844fc;p=chiark-tcl.git diff --git a/crypto/crypto.h b/crypto/crypto.h index 82efb61..0028edb 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -1,3 +1,29 @@ +/* + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + + +#ifndef CRYPTO_H +#define CRYPTO_H + +#include "chiark-tcl.h" + /* from crypto.c */ void memxor(Byte *dest, const Byte *src, int l); @@ -7,7 +33,7 @@ typedef struct { int pad, use_algname; } PadOp; -extern Tcl_ObjType blockcipherkey_type; +extern Tcl_ObjType cht_blockcipherkey_type; /* from algtables.c */ @@ -25,7 +51,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 +66,7 @@ typedef struct { BlockCipherPerDirectionInfo encrypt, decrypt; } BlockCipherAlgInfo; -extern const BlockCipherAlgInfo blockcipheralginfos[]; +extern const BlockCipherAlgInfo cht_blockcipheralginfo_entries[]; /* from bcmode.c */ @@ -73,5 +99,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*/