Skip to content

Commit 3e4bfcc

Browse files
committed
replace deprecated crypto:sha with crypto:hash
1 parent 6933886 commit 3e4bfcc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/elli_ws_protocol.erl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ handler_init(State=#state{env=Env, handler=Handler}, Req, HandlerOpts) ->
185185
%% | {suspend, module(), atom(), [any()]}
186186
%% when Req::elli_ws_request_adapter:req().
187187
websocket_handshake(State=#state{key=Key, deflate_frame=DeflateFrame, handler=Handler}, Req, HandlerState) ->
188-
%% @todo Change into crypto:hash/2 for R17B+ or when supporting only R16B+.
189-
Challenge = base64:encode(crypto:sha(
188+
Challenge = base64:encode(crypto:hash(sha,
190189
<< Key/binary, "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" >>)),
191190
Extensions = case DeflateFrame of
192191
false -> [];

0 commit comments

Comments
 (0)