Truxton file open md5

From truxwiki.com
Revision as of 13:59, 1 June 2020 by Sam (talk | contribs) (Created page with "This retrieves the first file from Truxton with a matching [https://en.wikipedia.org/wiki/MD5 MD5] hash. =Syntax= <syntaxhighlight lang="C"> uint64_t truxton_file_open_md5( u...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This retrieves the first file from Truxton with a matching MD5 hash.

Syntax

uint64_t truxton_file_open_md5( uint64_t truxton_handle, char const * hash_string )

Parameters

truxton_handle

The handle created by the truxton_create call.

hash_string

The string representation of the MD5 hash of the contents of the file. This corresponds to the HashID column of the File table.

Return value

A handle to a read-only file in Truxton.

Sample

int check_it(uint64_t truxton)
{
   uint64_t file = truxton_file_open_md5(truxton, "9ec8fb6095c35eff2b236863b7caaf10");

   if ( file != 0 )
   {
      return(0);
   }

   truxton_file_close(file);

   return(1)
}