chiark / gitweb /
better core algorithm selection and new core alg suites
[chiark-tcl.git] / base / chiark-tcl.h
index 7b66932a2eb87c45ba4bcb8809a29d03f9b76582..06c98fce518d12654e61912823671b0c2ce58034 100644 (file)
  *  hbytes pkcs5 pn|un VAR BLOCKSIZE             => worked?  (always 1 for p)
  *  hbytes blockcipher d|e VAR ALG KEY MODE [IV] => IV
  *  hbytes blockcipher mac MSG ALG KEY MODE IV   => final block
+ *  hbytes blockcipher prop PROPERTY ALG         => property value
  *
  *  hbytes hash ALG MESSAGE                      => hash
  *  hbytes hmac ALG MESSAGE KEY [MACLENGTH]      => mac
+ *  hbytes hash-prop PROPERTY ALG                => property value
  *
  *  ulong ul2int ULONG    => INT           can fail if >INT_MAX
  *  ulong int2ul INT      => ULONG         can fail if <0
  *  ulong mask A B                         => A & B
  *  ulong add A B                          => A + B  (mod 2^32)
  *  ulong subtract A B                     => A - B  (mod 2^32)
- *  ulong compare A B                      => 0/-1/1
+ *  ulong compare A B                      => 0  -1 (A<B)  +1 (A>B)
  *  ulong shift l|r ULONG BITS             fails if BITS >32
  *
  *  ulong ul2bitfields VALUE [SIZE TYPE [TYPE-ARG...] ...]  => 0/1
@@ -241,6 +243,11 @@ 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;