Skip to content

Commit

Permalink
fix deprecation warning: replace crypto:sha(... with crypto:hash(sha...
Browse files Browse the repository at this point in the history
  • Loading branch information
enewhuis committed Jan 1, 2014
1 parent 8158861 commit 8760e0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/websocket_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ generate_ws_key() ->
-spec validate_handshake(HandshakeResponse :: binary(), Key :: binary()) -> {ok, binary()}.
validate_handshake(HandshakeResponse, Key) ->
Challenge = base64:encode(
crypto:sha(<< Key/binary, "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" >>)),
crypto:hash(sha, << Key/binary, "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" >>)),
%% Consume the response...
{ok, _Status, Header, Buffer} = consume_response(HandshakeResponse),
%% ...and make sure the challenge is valid.
Expand Down

0 comments on commit 8760e0b

Please sign in to comment.