summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ht.erl12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/ht.erl b/src/ht.erl
index 120a77a..dcaa587 100644
--- a/src/ht.erl
+++ b/src/ht.erl
@@ -111,17 +111,7 @@ mkhead(Head, [H|T]) ->
-spec hashfun(iolist() | binary()) -> binary().
hashfun(Data) ->
- code:ensure_loaded(crypto),
- case erlang:function_exported(crypto, hash, 2) of
- true -> crypto:hash(sha256, Data);
- _ -> crypto:sha(Data)
- end.
-%% hashfun_init() ->
-%% sha_init().
-%% hashfun_update(C, D) ->
-%% sha_update(C, D).
-%% hashfun_final(C) ->
-%% sha_final(C).
+ crypto:hash(sha256, Data).
-spec mkleaf(iolist() | binary()) -> leaf().
mkleaf(Data) ->