1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-27 21:53:20 +00:00

Added ability to fetch core hash

This commit is contained in:
Bryan Roe
2020-04-08 17:57:28 -07:00
parent 00b613fcb1
commit 34a1b1a4d5
3 changed files with 18 additions and 2 deletions

View File

@@ -702,7 +702,11 @@ __EXPORT_TYPE char* ILibSimpleDataStore_GetHashEx(ILibSimpleDataStore dataStore,
if (entry == NULL) return NULL; // If there is no in-memory entry for this key, return zero now.
return entry->valueHash;
}
int ILibSimpleDataStore_GetHashSize()
{
ILibSimpleDataStore_TableEntry e;
return((int)sizeof(e.valueHash));
}
// Delete a key and value from the data store
__EXPORT_TYPE int ILibSimpleDataStore_DeleteEx(ILibSimpleDataStore dataStore, char* key, int keyLen)
{

View File

@@ -66,9 +66,10 @@ __EXPORT_TYPE int ILibSimpleDataStore_GetEx(ILibSimpleDataStore dataStore, char*
#define ILibSimpleDataStore_Get(dataStore, key, buffer, bufferLen) ILibSimpleDataStore_GetEx(dataStore, key, (int)strnlen_s(key, ILibSimpleDataStore_MaxKeyLength), buffer, bufferLen)
__EXPORT_TYPE int ILibSimpleDataStore_GetInt(ILibSimpleDataStore dataStore, char* key, int defaultValue);
// Get the SHA256 hash value from the datastore for a given a key.
// Get the SHA384 hash value from the datastore for a given a key.
__EXPORT_TYPE char* ILibSimpleDataStore_GetHashEx(ILibSimpleDataStore dataStore, char* key, int keyLen);
#define ILibSimpleDataStore_GetHash(dataStore, key) ILibSimpleDataStore_GetHashEx(dataStore, key, (int)strnlen_s(key, ILibSimpleDataStore_MaxKeyLength))
int ILibSimpleDataStore_GetHashSize();
// Delete a key from the data store
__EXPORT_TYPE int ILibSimpleDataStore_DeleteEx(ILibSimpleDataStore dataStore, char* key, int keyLen);