chiark / gitweb /
better core algorithm selection and new core alg suites
[chiark-tcl.git] / crypto / crypto.c
index 1fc1f83..9b79881 100644 (file)
@@ -359,3 +359,17 @@ int do_hbytes_hmac(ClientData cd, Tcl_Interp *ip, const HashAlgInfo *alg,
 
   return TCL_OK;
 }
+
+int do_blockcipherop_prop(ClientData cd, Tcl_Interp *ip,
+                         const BlockCipherPropInfo *prop,
+                         const BlockCipherAlgInfo *alg, int *result) {
+  *result= *(const int*)((const char*)alg + prop->int_offset);
+  return TCL_OK;
+}
+
+int do_hbytes_hash_prop(ClientData cd, Tcl_Interp *ip,
+                       const HashAlgPropInfo *prop,
+                       const HashAlgInfo *alg, int *result) {
+  *result= *(const int*)((const char*)alg + prop->int_offset);
+  return TCL_OK;
+}