Permalink
Browse files

replaced deprecated crypto:sha_mac/2 with crypto:hmac/3

  • Loading branch information...
1 parent 7943b10 commit e206c0acd29da42a40edfd9005db481df8d3c517 @dnet dnet committed with Jul 15, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/oauth.erl
View
@@ -128,7 +128,7 @@ hmac_sha1_signature(HttpMethod, URL, Params, Consumer, TokenSecret) ->
hmac_sha1_signature(BaseString, Consumer, TokenSecret) ->
Key = uri_join([consumer_secret(Consumer), TokenSecret]),
- base64:encode_to_string(crypto:sha_mac(Key, BaseString)).
+ base64:encode_to_string(crypto:hmac(sha, Key, BaseString)).
hmac_sha1_verify(Signature, HttpMethod, URL, Params, Consumer, TokenSecret) ->
verify_in_constant_time(Signature, hmac_sha1_signature(HttpMethod, URL, Params, Consumer, TokenSecret)).

0 comments on commit e206c0a

Please sign in to comment.