summaryrefslogtreecommitdiff
path: root/ckcapi-object.h
diff options
context:
space:
mode:
Diffstat (limited to 'ckcapi-object.h')
-rw-r--r--ckcapi-object.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/ckcapi-object.h b/ckcapi-object.h
index 98451f6..9a664d1 100644
--- a/ckcapi-object.h
+++ b/ckcapi-object.h
@@ -30,6 +30,12 @@
typedef CK_RV (*CkCapiLoadData)(CkCapiSession* sess, struct _CkCapiObject* obj,
CkCapiObjectData** objdata);
+/* Produce a hash code for an object */
+typedef CK_RV (*CkCapiHashObject)(struct _CkCapiObject* obj);
+
+/* Produce a hash code for an object */
+typedef CK_RV (*CkCapiEqualObject)(struct _CkCapiObject* one, struct _CkCapiObject* two);
+
/* A function to free some data */
typedef void (*CkCapiRelease)(void* data);
@@ -37,6 +43,8 @@ typedef void (*CkCapiRelease)(void* data);
typedef struct _CkCapiObjectVtable
{
CkCapiLoadData load_data;
+ CkCapiHashObject hash_object;
+ CkCapiEqualObject equal_object;
CkCapiRelease release;
}
CkCapiObjectVtable;
@@ -48,8 +56,6 @@ struct _CkCapiObject
CK_SLOT_ID slot;
CK_SESSION_HANDLE session;
const CkCapiObjectVtable* obj_funcs;
- void* unique_key;
- size_t unique_len;
};
/* A function to get an attribute from ObjectData */