chiark / gitweb /
better core algorithm selection and new core alg suites
[chiark-tcl.git] / crypto / crypto.c
index 1fc1f8336bfe65cf14b5934987ac11c0f7d1ba93..9b79881941eaa6418495489830a3546df09b58a6 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;
+}