* mu-util: add mu_util_get_hash (refactored)

This commit is contained in:
djcb
2012-12-25 16:45:05 +02:00
parent 19a0c1c478
commit 1a14d19cad
2 changed files with 38 additions and 0 deletions

View File

@ -502,6 +502,20 @@ gboolean mu_util_g_set_error (GError **err, MuError errcode, const char *frm, ..
G_GNUC_PRINTF(3,4);
/**
* calculate a 64-bit hash for the given string, based on a
* combination of the DJB and BKDR hash functions
*
* @param a string
*
* @return the hash as a static string, which stays valid until this
* function is called again.
*/
const char* mu_util_get_hash (const char* str);
#define MU_COLOR_RED "\x1b[31m"
#define MU_COLOR_GREEN "\x1b[32m"
#define MU_COLOR_YELLOW "\x1b[33m"