From 195801b69f3814d9d6d3fc7110fef32b64d44224 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 7 May 2014 07:57:13 +0100 Subject: Remove support for crypto:sha(). We're not on R15 any more. --- src/ht.erl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/ht.erl') 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) -> -- cgit v1.1