Skip to content

Commit

Permalink
Resolve unused variable warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng authored and 5HT committed Jul 2, 2022
1 parent fe86fca commit 6f63e98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/n2o_multipart.erl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stream_body(Req0, Acc) ->
init(Req, Opts) ->
{ok, Body, Req2} = acc_multipart(Req, []),
{Headers, Data} = hd(Body),
{file, _, Filename, ContentType} = cow_multipart:form_data(Headers),
{file, _, _Filename, _ContentType} = cow_multipart:form_data(Headers),
GUID = erp:guid(),
Size = erlang:integer_to_list(erlang:size(Data)),
file:write_file(GUID, Data, [raw, binary]),
Expand Down
2 changes: 1 addition & 1 deletion src/services/n2o_secret.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ depickle(PickledData) ->
Decoded = unhex(iolist_to_binary(PickledData)),
<<IV:16/binary,Signature:32/binary,Cipher/binary>> = Decoded,
Signature = mac([application:get_env(n2o,hmac,sha256),Key,<<Cipher/binary,IV/binary>>]),
Decipher = case erlang:list_to_integer(erlang:system_info(otp_release)) of
_Decipher = case erlang:list_to_integer(erlang:system_info(otp_release)) of
X when X =< 22 -> binary_to_term(erlang:apply(crypto,block_decrypt,[aes_cbc128,Key,IV,Cipher]),[safe]) ;
_ -> binary_to_term(erlang:apply(crypto,crypto_one_time,[aes_128_cbc,Key,IV,Cipher,[{encrypt,false}]]),[safe])
end
Expand Down

0 comments on commit 6f63e98

Please sign in to comment.