Difference between revisions of "Truxton message set hash"
Jump to navigation
Jump to search
| Line 3: | Line 3: | ||
=Syntax= | =Syntax= | ||
<source lang="C"> | <source lang="C"> | ||
| − | void truxton_message_set_hash( uint64_t message_handle, char * hash ); | + | void truxton_message_set_hash( uint64_t message_handle, char const * hash ); |
</source> | </source> | ||
Revision as of 16:05, 16 February 2021
Sets the MD5 hash field of the message.
Syntax
void truxton_message_set_hash( uint64_t message_handle, char const * hash );
Parameters
message_handle
The handle created by the truxton_message_create call.
hash
The string representation of an MD5 hash.
This string will not be checked for validity, it will simply put the first 32 characters of hash you provided into the message.
Sample
void set_hash( uint64_t message, uint64_t file )
{
char hash_string[ MAX_PATH ];
truxton_file_get_hash( file, hash_string, sizeof(hash_string) );
truxton_message_set_hash( message, hash_string );
}