Difference between revisions of "Truxton message set hash"
Jump to navigation
Jump to search
(→hash) |
|||
| Line 12: | Line 12: | ||
==<code>hash</code>== | ==<code>hash</code>== | ||
The string representation of an [https://en.wikipedia.org/wiki/MD5 MD5] hash. | The string representation of an [https://en.wikipedia.org/wiki/MD5 MD5] hash. | ||
| − | This string will not be checked for validity, it will | + | This string will not be checked for validity, it will put the first 32 characters of <code>hash</code> you provided into the message. |
=Sample= | =Sample= | ||
Latest revision as of 13:43, 30 April 2023
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 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 );
}