chiark / gitweb /
Abolish serpent-l. Use PKCS#1 v1.5 RSA padding but without hash OID for secnet.
[chiark-tcl.git] / base / chiark-tcl.h
index 864019e50d82a9edfb297cbf335b6a5953872bce..ce00dd9537128a56d8227adc73c6d3eaa125328d 100644 (file)
@@ -14,6 +14,9 @@
  *                                                  (too short? error)
  *
  *  hbytes range VALUE START SIZE                => substring (or error)
+ *  hbytes overwrite VAR START VALUE
+ *  hbytes trimleft VALUE                        removes any leading 0 octets
+ *  hbytes repeat VALUE COUNT                    => COUNT copies of VALUE
  *
  *  hbytes h2ulong HEX                           => ulong  (HEX len must be 4)
  *  hbytes ulong2h UL                            => hex
@@ -217,15 +220,15 @@ typedef struct {
   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);
+  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 Byte *key, int keylen);
+  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 */
@@ -234,7 +237,7 @@ typedef struct {
 typedef struct {
   const char *name;
   int blocksize, schedule_size, key_min, key_max;
-  void (*byteswap)(Byte *block);
+  void (*byteswap)(void *block);
   BlockCipherDirectionInfo encrypt, decrypt;
 } BlockCipherAlgInfo;