Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files
Fix crypto deprecations
  • Loading branch information
rnewson committed Sep 23, 2015
1 parent 2e26bf0 commit 099057a98e41f3aff91e77e3cf496d6c6fd901df
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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(couch_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 099057a

Please sign in to comment.