chiark / gitweb /
Better integration with tclreadline. Less recompilation of serpent.[ch].
[chiark-tcl.git] / hbytes / hbytes.h
index c5ffc06bbf0da4cd07826a2f1bdf9e6cb0a0c3b5..86b2dba6dec3c3b550b6252258f45eef4c6f69dc 100644 (file)
@@ -78,7 +78,7 @@ void hbytes_empty(HBytes_Value *returns);
 void hbytes_sentinel(HBytes_Value *returns);
 void hbytes_array(HBytes_Value *returns, const Byte *array, int l);
 Byte *hbytes_arrayspace(HBytes_Value *returns, int l);
-void hbytes_free(HBytes_Value *frees);
+void hbytes_free(const HBytes_Value *frees);
   /* _empty, _sentinel and _array do not free or read the old value;
    * _free it first if needed.  _free leaves it garbage, so you
    * have to call _empty to reuse it.  _arrayspace doesn't fill
@@ -140,13 +140,18 @@ typedef struct {
 
 Tcl_ObjType blockcipherkey_type;
 
-/* from hash.c */
+/* from algtables.c */
 
 typedef struct {
-  int blocksize, hashsize;
+  const char *name;
+  int hashsize, blocksize, statesize;
+  void (*init)(void *state);
+  void (*update)(void *state, const Byte *data, int len);
+  void (*final)(void *state, Byte *digest);
+  void (*oneshot)(Byte *digest, const Byte *data, int len);
 } HashAlgInfo;
 
-/* from blockciph.c */
+extern const HashAlgInfo hashalginfos[];
 
 typedef struct {
   void (*make_schedule)(void *schedule, const Byte *key, int keylen);