include/razorback/hash.h File Reference

Hash functions. More...

#include <razorback/visibility.h>
#include <razorback/types.h>
Include dependency graph for hash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

SO_PUBLIC bool Hash_IsEqual (const struct Hash *p_pHashA, const struct Hash *p_pHashB)
 Determines whether to hashes are equal.
SO_PUBLIC char * Hash_ToText (const struct Hash *p_pHash)
 Converts a hash to text.
SO_PUBLIC struct HashHash_Create (void)
 Create a hash.
SO_PUBLIC struct HashHash_Create_Type (uint32_t p_iType)
SO_PUBLIC uint32_t Hash_DigestLength (struct Hash *p_pHash)
 Return the size of the digest in bytes.
SO_PUBLIC uint32_t Hash_BinaryLength (struct Hash *p_pHash)
SO_PUBLIC uint32_t Hash_StringLength (struct Hash *p_pHash)
 Return the size of the string required to hold the hex encoded digets.
SO_PUBLIC bool Hash_Update (struct Hash *p_pHash, uint8_t *p_pData, uint32_t p_iLength)
 Update the hash with new data.
SO_PUBLIC bool Hash_Update_File (struct Hash *p_pHash, FILE *file)
SO_PUBLIC bool Hash_Finalize (struct Hash *p_pHash)
 Finalize the has value.
SO_PUBLIC void Hash_Destroy (struct Hash *p_pHash)
 destroys a hash
SO_PUBLIC struct HashHash_Clone (const struct Hash *p_pSource)
 copies a hash

Detailed Description

Hash functions.


Function Documentation

SO_PUBLIC struct Hash* Hash_Clone ( const struct Hash p_pSource  )  [read]

copies a hash

Parameters:
p_pDestination the destination
p_pSource the source
SO_PUBLIC struct Hash* Hash_Create ( void   )  [read]

Create a hash.

Returns:
a new hash on success NULL on error.
SO_PUBLIC void Hash_Destroy ( struct Hash p_pHash  ) 

destroys a hash

Parameters:
p_pHash the hash
SO_PUBLIC uint32_t Hash_DigestLength ( struct Hash p_pHash  ) 

Return the size of the digest in bytes.

Parameters:
p_pHash the hash.
Returns:
the length in bytes.
SO_PUBLIC bool Hash_Finalize ( struct Hash p_pHash  ) 

Finalize the has value.

Parameters:
*p_pHash The hash object.
Returns:
true on success false on error.
SO_PUBLIC bool Hash_IsEqual ( const struct Hash p_pHashA,
const struct Hash p_pHashB 
)

Determines whether to hashes are equal.

Parameters:
p_pHashA the first hash
p_pHashB the second hash
Returns:
true if equal, false otherwise
SO_PUBLIC uint32_t Hash_StringLength ( struct Hash p_pHash  ) 

Return the size of the string required to hold the hex encoded digets.

Parameters:
p_pHash the hash.
Returns:
the length of the array including null
SO_PUBLIC char* Hash_ToText ( const struct Hash p_pHash  ) 

Converts a hash to text.

Parameters:
p_pHash the hash
Returns:
The string (requires free'ing) or NULL on error.
SO_PUBLIC bool Hash_Update ( struct Hash p_pHash,
uint8_t *  p_pData,
uint32_t  p_iLength 
)

Update the hash with new data.

Parameters:
*p_pHash The hash to update.
*p_pData The data to compute the hash of.
*p_iLength The length of the data.
Returns:
true on sucess false on error.
 All Data Structures Files Functions Variables Enumerations Enumerator Defines
Generated on Sun Dec 9 04:00:11 2012 for RazorbackAPI by  doxygen 1.6.3