Function gnunet_sys::GNUNET_CRYPTO_hash_xorcmp [−][src]
pub unsafe extern "C" fn GNUNET_CRYPTO_hash_xorcmp(
h1: *const GNUNET_HashCode,
h2: *const GNUNET_HashCode,
target: *const GNUNET_HashCode
) -> c_int
@ingroup hash Find out which of the two GNUNET_CRYPTO_hash codes is closer to target in the XOR metric (Kademlia).
@param h1 some hash code @param h2 some hash code @param target some hash code @return -1 if @a h1 is closer, 1 if @a h2 is closer and 0 if @a h1== @a h2.