*
* hbytes pkcs5 pa|ua VAR ALG => worked? (always 1 for p)
* hbytes pkcs5 pn|un VAR BLOCKSIZE => worked? (always 1 for p)
- * hbytes blockcipher d|e VAR ALG MODE [IV] => IV
+ * hbytes blockcipher d|e VAR ALG KEY MODE [IV] => IV
*
* hbytes hash ALG MESSAGE => hash
* hbytes hmac ALG MESSAGE KEY [MACLENGTH] => mac
int staticerr(Tcl_Interp *ip, const char *m);
void objfreeir(Tcl_Obj *o);
+void obj_updatestr_array(Tcl_Obj *o, const Byte *array, int l);
+int get_urandom(Tcl_Interp *ip, Byte *buffer, int l);
/* from parse.c */
int pad, use_algname;
} PadMethod;
-/* from hash.c */
+Tcl_ObjType blockcipherkey_type;
+
+/* 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);