  %%Simple routingtable
  %-define(RT, rt_simple).
 diff --git a/src/rt_chord.erl b/src/rt_chord.erl
-index 8804127..4aeabf5 100644
+index a3260df..cb32c19 100644
 --- a/src/rt_chord.erl
 +++ b/src/rt_chord.erl
-@@ -62,7 +62,7 @@ hash_key(Key) -> hash_key_(Key).
- %%      opaque key type).
- -spec hash_key_(client_key()) -> key_t().
+@@ -64,7 +64,7 @@ hash_key(Key) -> hash_key_(Key).
+ hash_key_(Key) when not is_binary(Key) ->
+     hash_key_(client_key_to_binary(Key));
  hash_key_(Key) ->
--    <<N:128>> = erlang:md5(client_key_to_binary(Key)),
-+    <<N:16,_:112>> = erlang:md5(client_key_to_binary(Key)),
+-    <<N:128>> = ?CRYPTO_MD5(Key),
++    <<N:16,_:112>> = ?CRYPTO_MD5(Key),
      N.
  
  %% @doc Generates a random node id, i.e. a random 128-bit number, based on the
-@@ -115,14 +115,14 @@ get_size(RT) ->
+@@ -117,14 +117,14 @@ get_size(RT) ->
  
  %% @doc Keep a key in the address space. See n/0.
  -spec normalize(non_neg_integer()) -> key_t().

 
 -spec get_key_segment(key()) -> pos_integer().
-- 
1.8.1.1


From f79c8c8ce5ba28952d7f9406cbdf39e1aca5c197 Mon Sep 17 00:00:00 2001
From: Nico Kruber <kruber@zib.de>
Date: Sat, 9 Nov 2013 16:11:10 +0100
Subject: [PATCH] rt_chord: reduce key size to 16 bits for better debugging

---
