#include "hashdb_tools_i.h"
Functions | |
| uint8_t | tsk_hdb_idxinitialize (TSK_HDB_INFO *hdb_info, TSK_TCHAR *htype) |
| Initialize the TSK hash DB index file. | |
| uint8_t | tsk_hdb_idxaddentry (TSK_HDB_INFO *hdb_info, char *hvalue, OFF_T offset) |
| Add an entry to the intermediate index file. | |
| uint8_t | tsk_hdb_idxfinalize (TSK_HDB_INFO *hdb_info) |
| Finalize index creation process by sorting the index and removing the intermediate temp file. | |
| int8_t | tsk_hdb_lookup (TSK_HDB_INFO *hdb_info, char *hash, TSK_HDB_FLAG_ENUM flags, TSK_HDB_LOOKUP_FN action, void *ptr) |
| Perform the binary search in the index for the text/ASCII hash value. | |
| int8_t | tsk_hdb_lookup_raw (TSK_HDB_INFO *hdb_info, uint8_t *hash, uint8_t len, TSK_HDB_FLAG_ENUM flags, TSK_HDB_LOOKUP_FN action, void *ptr) |
| Perform the binary search in the index for a hash value given in a raw (non-text) format. | |
| uint8_t | tsk_hdb_hasindex (TSK_HDB_INFO *hdb_info, uint8_t htype) |
| Determine if the hash database that is open has an index that has been created. | |
| TSK_HDB_INFO * | tsk_hdb_open (TSK_TCHAR *db_file, TSK_HDB_OPEN_ENUM flags) |
| Open a hash database and index for lookup. | |
| void | tsk_hdb_close (TSK_HDB_INFO *hdb_info) |
| Close the HDB_INFO structure and free the memory. | |
| void tsk_hdb_close | ( | TSK_HDB_INFO * | hdb_info | ) |
Close the HDB_INFO structure and free the memory.
| hdb_info | Structure to free. |
| uint8_t tsk_hdb_hasindex | ( | TSK_HDB_INFO * | hdb_info, | |
| uint8_t | htype | |||
| ) |
Determine if the hash database that is open has an index that has been created.
| hdb_info | Hash database to consider | |
| htype | Hash type that index should be of |
| uint8_t tsk_hdb_idxaddentry | ( | TSK_HDB_INFO * | hdb_info, | |
| char * | hvalue, | |||
| OFF_T | offset | |||
| ) |
Add an entry to the intermediate index file.
| hdb_info | Hash database state info | |
| hvalue | Hash value to add | |
| offset | Byte offset of hash entry in original database. |
| uint8_t tsk_hdb_idxfinalize | ( | TSK_HDB_INFO * | hdb_info | ) |
Finalize index creation process by sorting the index and removing the intermediate temp file.
| hdb_info | Hash database state info structure. |
| uint8_t tsk_hdb_idxinitialize | ( | TSK_HDB_INFO * | hdb_info, | |
| TSK_TCHAR * | htype | |||
| ) |
Initialize the TSK hash DB index file.
This creates the intermediate file, which will have entries added to it. This file must be sorted before the process is finished.
| hdb_info | Hash database state structure | |
| htype | String of index type to create |
| int8_t tsk_hdb_lookup | ( | TSK_HDB_INFO * | hdb_info, | |
| char * | hash, | |||
| TSK_HDB_FLAG_ENUM | flags, | |||
| TSK_HDB_LOOKUP_FN | action, | |||
| void * | ptr | |||
| ) |
Perform the binary search in the index for the text/ASCII hash value.
| hdb_info | Hash database state information | |
| hash | Hash value to search for | |
| flags | ||
| action | Callback function to call for each hash db entry (not called if QUICK flag is given) | |
| ptr | Pointer to data to pass to each callback |
| int8_t tsk_hdb_lookup_raw | ( | TSK_HDB_INFO * | hdb_info, | |
| uint8_t * | hash, | |||
| uint8_t | len, | |||
| TSK_HDB_FLAG_ENUM | flags, | |||
| TSK_HDB_LOOKUP_FN | action, | |||
| void * | ptr | |||
| ) |
Perform the binary search in the index for a hash value given in a raw (non-text) format.
this is a wrapper around the normal lookup function.
| hdb_info | Hash database state information | |
| hash | Array with binary hash value to search for | |
| len | Number of bytes in binary hash value | |
| flags | ||
| action | Callback function to call for each hash db entry (not called if QUICK flag is given) | |
| ptr | Pointer to data to pass to each callback |
| TSK_HDB_INFO* tsk_hdb_open | ( | TSK_TCHAR * | db_file, | |
| TSK_HDB_OPEN_ENUM | flags | |||
| ) |
Open a hash database and index for lookup.
| db_file | Path to database. | |
| flags | Flags for opening the database. |
1.5.1