diff options
author | Stef Walter <stef@memberwebs.com> | 2008-12-09 03:47:01 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-12-09 03:47:01 +0000 |
commit | 94c63a237d77654bab2ea34146b06fd4b0acfc99 (patch) | |
tree | e726b7d285dd9f188ba92830355f64b8cba644ab /ckcapi-object.h | |
parent | a71df0e849b4e286f29ae6e26973961d3412cd83 (diff) |
Use better and faster hashing of objects.
Diffstat (limited to 'ckcapi-object.h')
-rw-r--r-- | ckcapi-object.h | 10 |
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 */ |