Browse Source

changed deprecated sha_mac/2 to hmac/3

Andrey Sergienko 10 years ago
parent
commit
b5b8efa534
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/oauth.erl

+ 1 - 1
src/oauth.erl

@@ -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(sha256, Key, BaseString)).
 
 hmac_sha1_verify(Signature, HttpMethod, URL, Params, Consumer, TokenSecret) ->
   verify_in_constant_time(Signature, hmac_sha1_signature(HttpMethod, URL, Params, Consumer, TokenSecret)).