-Tcl_ObjType ulong_type;
-
-/* from enum.c */
-
-extern Tcl_ObjType enum_nearlytype;
-extern Tcl_ObjType enum1_nearlytype;
-
-const void *enum_lookup_cached_func(Tcl_Interp *ip, Tcl_Obj *o,
- const void *firstentry, size_t entrysize,
- const char *what);
-#define enum_lookup_cached(ip,o,table,what) \
- (enum_lookup_cached_func((ip),(o), \
- &(table)[0],sizeof((table)[0]), \
- (what)))
- /* table should be a pointer to an array of structs of size
- * entrysize, the first member of which should be a const char*.
- * The table should finish with a null const char *.
- * On error, 0 is returned and the ip->result will have been
- * set to the error message.
- */
-
-int enum1_lookup_cached_func(Tcl_Interp *ip, Tcl_Obj *o,
- const char *opts, const char *what);
- /* -1 => error */
-
-/* from crypto.c */
-
-void memxor(Byte *dest, const Byte *src, int l);
-
-typedef struct {
- const char *name;
- int pad, use_algname;
-} PadOp;
-
-extern Tcl_ObjType blockcipherkey_type;
-
-/* from algtables.c */
-
-typedef struct {
- const char *name;
- int int_offset;
-} BlockCipherPropInfo, HashAlgPropInfo;
-
-typedef struct {
- const char *name;
- int hashsize, blocksize, statesize;
- void (*init)(void *state);
- void (*update)(void *state, const void *data, int len);
- void (*final)(void *state, void *digest);
- void (*oneshot)(void *digest, const void *data, int len);
-} HashAlgInfo;
-
-extern const HashAlgInfo hashalginfos[];
-
-typedef struct {
- void (*make_schedule)(void *schedule, const void *key, int keylen);
- void (*crypt)(const void *schedule, const void *in, void *out);
- /* in and out may be the same, but if they aren't they may not overlap */
- /* in and out for crypt will have been through block_byteswap */
-} BlockCipherPerDirectionInfo;
-
-typedef struct {
- const char *name;
- int blocksize, schedule_size, key_min, key_max;
- BlockCipherPerDirectionInfo encrypt, decrypt;
-} BlockCipherAlgInfo;
-
-extern const BlockCipherAlgInfo blockcipheralginfos[];
-
-/* from bcmode.c */
-
-typedef struct {
- const char *name;
- int iv_blocks, buf_blocks, mac_blocks;
-
- /* Each function is allowed to use up to buf_blocks * blocksize
- * bytes of space in buf. data is blocks * blocksize bytes
- * long. data should be modified in place by encrypt and decrypt;
- * modes may not change the size of data. iv is always provided and
- * is always of length iv_blocks * blocksize; encrypt and
- * decrypt may modify the iv value (in which case the Tcl caller
- * will get the modified IV) but this is not recommended. mac
- * should leave the mac, which must be mac_blocks * blocksize
- * bytes, in buf. (Therefore mac_blocks must be at least
- * buf_blocks.)
- */
- const char *(*encrypt)(Byte *data, int nblocks,
- const Byte *iv, Byte *buf,
- const BlockCipherAlgInfo *alg, int encr,
- const void *sch);
- const char *(*decrypt)(Byte *data, int nblocks,
- const Byte *iv, Byte *buf,
- const BlockCipherAlgInfo *alg, int encr,
- const void *sch);
- const char *(*mac)(const Byte *data, int nblocks,
- const Byte *iv, Byte *buf,
- const BlockCipherAlgInfo *alg,
- const void *sch);
-} BlockCipherModeInfo;
-
-extern const BlockCipherModeInfo blockciphermodeinfos[];
-
-/* from misc.c */
-
-int setnonblock(int fd, int isnonblock);