diff options
-rw-r--r-- | src/ht.erl | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -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) -> |