Difference between revisions of "Truxton message get hash"
Jump to navigation
Jump to search
| Line 3: | Line 3: | ||
=Syntax= | =Syntax= | ||
| − | < | + | <source lang="C"> |
void truxton_message_get_hash( uint64_t message_handle, char * destination_string, size_t max_size ); | void truxton_message_get_hash( uint64_t message_handle, char * destination_string, size_t max_size ); | ||
| − | </ | + | </source> |
=Parameters= | =Parameters= | ||
| Line 19: | Line 19: | ||
=Sample= | =Sample= | ||
<source lang="C" highlight="5"> | <source lang="C" highlight="5"> | ||
| − | void print_hash(uint64_t message_handle) | + | void print_hash( uint64_t message_handle ) |
{ | { | ||
char guid_string[ 40 ]; | char guid_string[ 40 ]; | ||
| − | truxton_message_get_hash( message_handle, guid_string, sizeof(guid_string)); | + | truxton_message_get_hash( message_handle, guid_string, sizeof(guid_string) ); |
| − | printf( "Hash is %s\n", guid_string); | + | printf( "Hash is %s\n", guid_string ); |
} | } | ||
</source> | </source> | ||
Latest revision as of 12:35, 9 February 2021
This retrieves the MD5 hash of the file this file's contents.
This corresponds to the [HashID] column of the [File] table.
Syntax
void truxton_message_get_hash( uint64_t message_handle, char * destination_string, size_t max_size );
Parameters
message_handle
The handle to a message created by the truxton_message_create call.
destination_string
The string to be written to.
max_size
The maximum number of characters that can be written to destination_string.
Sample
void print_hash( uint64_t message_handle )
{
char guid_string[ 40 ];
truxton_message_get_hash( message_handle, guid_string, sizeof(guid_string) );
printf( "Hash is %s\n", guid_string );
}