From b9f59ca2986075112ff1de42320168affa10921e Mon Sep 17 00:00:00 2001 From: Jason David Davies Date: Tue, 12 Jan 2010 19:29:23 +0000 Subject: Add utility for verifying hashes. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@898477 13f79535-47bb-0310-9956-ffa450edef68 --- src/erlang-oauth/oauth_hmac_sha1.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/erlang-oauth/oauth_hmac_sha1.erl') diff --git a/src/erlang-oauth/oauth_hmac_sha1.erl b/src/erlang-oauth/oauth_hmac_sha1.erl index 69064edd..79d59f37 100644 --- a/src/erlang-oauth/oauth_hmac_sha1.erl +++ b/src/erlang-oauth/oauth_hmac_sha1.erl @@ -8,4 +8,4 @@ signature(BaseString, CS, TS) -> base64:encode_to_string(crypto:sha_mac(Key, BaseString)). verify(Signature, BaseString, CS, TS) -> - Signature =:= signature(BaseString, CS, TS). + couch_util:verify(signature(BaseString, CS, TS), Signature). -- cgit v1.2.3