| Top |
| librdf_digest * | librdf_new_digest () |
| void | librdf_free_digest () |
| void | librdf_digest_init () |
| void | librdf_digest_update () |
| void | librdf_digest_update_string () |
| void | librdf_digest_final () |
| void * | librdf_digest_get_digest () |
| size_t | librdf_digest_get_digest_length () |
| char * | librdf_digest_to_string () |
| void | librdf_digest_print () |
librdf_digest * librdf_new_digest (librdf_world *world,const char *name);
Constructor - create a new librdf_digest object.
After construction, data should be added to the digest using librdf_digest_update or librdf_digest_update_string with librdf_digest_final to signify finishing. Then the digest value can be returned directly with librdf_digest_get_digest of librdf_digest_get_digest_length bytes or as a hex encoded string with librdf_digest_to_string. The digest can be re-initialised for new data with librdf_digest_init.
void
librdf_free_digest (librdf_digest *digest);
Destructor - destroy a librdf_digest object.
void
librdf_digest_init (librdf_digest *digest);
(Re)initialise the librdf_digest object.
This is automatically called on construction but can be used to re-initialise the digest to the initial state for digesting new data.
void librdf_digest_update (librdf_digest *digest,const unsigned char *buf,size_t length);
Add more data to the librdf_digest object.
void librdf_digest_update_string (librdf_digest *digest,const unsigned char *string);
Add a string to the librdf_digest object.
void
librdf_digest_final (librdf_digest *digest);
Finish the digesting of data.
The digest can now be returned via librdf_digest_get_digest().
void *
librdf_digest_get_digest (librdf_digest *digest);
Get the calculated digested value.
pointer to the memory containing the digest. It will be librdf_digest_get_digest_length bytes in length.
size_t
librdf_digest_get_digest_length (librdf_digest *digest);
Get length of the calculated digested.
char *
librdf_digest_to_string (librdf_digest *digest);
Get a string representation of the digest object.
a newly allocated string that represents the digest.
This must be released by the caller using librdf_free_memory().
void librdf_digest_print (librdf_digest *digest,FILE *fh);
Print the digest to a FILE handle.