Add a return value to hasher_t.get_hash()

This commit is contained in:
Martin Willi
2012-07-16 14:55:06 +02:00
parent ce73fc19db
commit 8bd6a30af1
23 changed files with 174 additions and 89 deletions
+4 -1
View File
@@ -67,6 +67,7 @@ extern enum_name_t *hash_algorithm_names;
* Generic interface for all hash functions.
*/
struct hasher_t {
/**
* Hash data and write it in the buffer.
*
@@ -79,8 +80,10 @@ struct hasher_t {
*
* @param data data to hash
* @param hash pointer where the hash will be written
* @return TRUE if hash created successfully
*/
void (*get_hash) (hasher_t *this, chunk_t data, u_int8_t *hash);
__attribute__((warn_unused_result))
bool (*get_hash) (hasher_t *this, chunk_t data, u_int8_t *hash);
/**
* Hash data and allocate space for the hash.