-SilcBool silc_hash_id_compare(void *key1, void *key2, void *user_context)
-{
- SilcIdType id_type = (SilcIdType)SILC_PTR_TO_32(user_context);
- return (id_type == SILC_ID_CLIENT ?
- SILC_ID_COMPARE_HASH((SilcClientID *)key1, (SilcClientID *)key2) :
- SILC_ID_COMPARE_TYPE(key1, key2, id_type));
-}
-
-/* Compares two ID's. Compares full IDs. */
-
-SilcBool silc_hash_id_compare_full(void *key1, void *key2, void *user_context)
-{
- SilcIdType id_type = (SilcIdType)SILC_PTR_TO_32(user_context);
- return SILC_ID_COMPARE_TYPE(key1, key2, id_type);
-}
-
-/* Compare two Client ID's entirely and not just the hash from the ID. */
-
-SilcBool silc_hash_client_id_compare(void *key1, void *key2,
- void *user_context)
-{
- return SILC_ID_COMPARE_TYPE(key1, key2, SILC_ID_CLIENT);
-}
-
-/* Compares binary data. May be used as SilcHashTable comparison function. */
-
-SilcBool silc_hash_data_compare(void *key1, void *key2, void *user_context)
-{
- SilcUInt32 len = SILC_PTR_TO_32(user_context);
- return !memcmp(key1, key2, len);
-}
-
-/* Compares UTF-8 string. */
-
-SilcBool silc_hash_utf8_compare(void *key1, void *key2, void *user_context)
-{
- int l1 = strlen((char *)key1);
- int l2 = strlen((char *)key2);
- if (l1 != l2)
- return FALSE;
- return !memcmp(key1, key2, l2);
-}
-
-/* Creates fingerprint from data, usually used with SHA1 digests */
-
-char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len)
-{
- char fingerprint[64], *cp;
- int i;
-
- memset(fingerprint, 0, sizeof(fingerprint));
- cp = fingerprint;