X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=crypto%2Fcrypto.h;h=13b565437355a60d32662fa69b435755b6bcda5c;hp=82efb6112e58d659fe40130e9ca6ccba45d91b09;hb=20f8fb4c0c8698ed4fbe844ab956f56ea5269ae8;hpb=da1c2c3cbb87a600f19e250f93ef9fa4f89844fc diff --git a/crypto/crypto.h b/crypto/crypto.h index 82efb61..13b5654 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -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 . + */ + + +#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*/