Fix type spec

This commit is contained in:
Tobias Lindahl 2019-02-26 12:01:33 +01:00
parent 8af4d27c75
commit d75e141f54

View File

@ -60,7 +60,7 @@ blake2s(HashLen, Msg0, Key) ->
%% Just return the requested part of the hash %% Just return the requested part of the hash
{ok, binary_part(to_little_endian(32, State), {0, HashLen})}. {ok, binary_part(to_little_endian(32, State), {0, HashLen})}.
-spec hmac(Hash :: blake2b | blake2s, Key :: binary(), Data :: binary()) -> {ok, binary()}. -spec hmac(Hash :: blake2b | blake2s, Key :: binary(), Data :: binary()) -> binary().
hmac(blake2b, Key, Data) -> hmac(blake2b, Key, Data) ->
hmac(128, fun(D) -> {ok, H} = blake2b(64, D), H end, Key, Data); hmac(128, fun(D) -> {ok, H} = blake2b(64, D), H end, Key, Data);
hmac(blake2s, Key, Data) -> hmac(blake2s, Key, Data) ->