Main Page | Data Structures | Directories | File List | Data Fields | Globals

# md5sum_index.c File Reference

## Detailed Description

Contains the MD5sum hash database specific extraction and printing routines.

`#include "hashdb_tools_i.h"`

## Defines
#define | STR_EMPTY ""
## Functions
uint8_t | md5sum_test (FILE *hFile)
| Test the file to see if it is a md5sum database.
uint8_t | md5sum_makeindex (TSK_HDB_INFO *hdb_info, TSK_TCHAR *dbtype)
| Process the database to create a sorted index of it.
uint8_t | md5sum_getentry (TSK_HDB_INFO *hdb_info, char *hash, OFF_T offset, TSK_HDB_FLAG_ENUM flags, TSK_HDB_LOOKUP_FN action, void *cb_ptr)
| Find the corresponding name at a given offset.

## Function Documentation

uint8_t md5sum_getentry | ( | TSK_HDB_INFO * | hdb_info,
|  | char * | hash,
|  | OFF_T | offset,
|  | TSK_HDB_FLAG_ENUM | flags,
|  | TSK_HDB_LOOKUP_FN | action,
|  | void * | cb_ptr
| ) |

  | Find the corresponding name at a given offset. The offset was likely determined from the index. The entries in the DB following the one specified are also processed if they have the same hash value and their name is different. The callback is called for each entry. Parameters:
  | hdb_info | Hash database to get data from
  | hash | MD5 hash value that was searched for
  | offset | Byte offset where hash value should be located in db_file
  | flags | (not used)
  | action | Callback used for each entry found in lookup
  | cb_ptr | Pointer to data passed to callback
Returns: 1 on error and 0 on succuss

uint8_t md5sum_makeindex | ( | TSK_HDB_INFO * | hdb_info,
|  | TSK_TCHAR * | dbtype
| ) |

  | Process the database to create a sorted index of it. Consecutive entries with the same hash value are not added to the index, but will be found during lookup. Parameters:
  | hdb_info | Hash database to make index of.
  | dbtype | Type of hash database (should always be TSK_HDB_DBTYPE_MD5SUM_STR)
Returns: 1 on error and 0 on success.

uint8_t md5sum_test | ( | FILE * | hFile | ) |

  | Test the file to see if it is a md5sum database. Parameters:
  | hFile | File handle to hash database
Returns: 1 if md5sum and 0 if not