Moved public key hash table util functions to crypto library.
[runtime.git] / lib / silcutil / silcutil.c
index a63efa9f5e50e3bc717eb188028aca432552ddb0..12315f7f96255c303cd263d13cc071b51b26e90e 100644 (file)
@@ -380,25 +380,6 @@ SilcUInt32 silc_hash_data(void *key, void *user_context)
   return h;
 }
 
-/* Hash public key of any type. */
-
-SilcUInt32 silc_hash_public_key(void *key, void *user_context)
-{
-  SilcPublicKey public_key = key;
-  unsigned char *pk;
-  SilcUInt32 pk_len;
-  SilcUInt32 hash = 0;
-
-  pk = silc_pkcs_public_key_encode(public_key, &pk_len);
-  if (!pk)
-    return hash;
-
-  hash = silc_hash_data(pk, SILC_32_TO_PTR(pk_len));
-  silc_free(pk);
-
-  return hash;
-}
-
 /* Compares two strings. It may be used as SilcHashTable comparison
    function. */
 
@@ -454,15 +435,6 @@ SilcBool silc_hash_utf8_compare(void *key1, void *key2, void *user_context)
   return !memcmp(key1, key2, l2);
 }
 
-/* Compares two SILC Public keys. It may be used as SilcHashTable
-   comparison function. */
-
-SilcBool silc_hash_public_key_compare(void *key1, void *key2,
-                                     void *user_context)
-{
-  return silc_pkcs_public_key_compare(key1, key2);
-}
-
 /* Creates fingerprint from data, usually used with SHA1 digests */
 
 char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len)