couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [07/12] oauth commit: updated refs/heads/import-master to db23ab2
Date Wed, 12 Feb 2014 06:22:25 GMT
Add utility for verifying hashes.


git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@898477 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/commit/a24be94a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/tree/a24be94a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/diff/a24be94a

Branch: refs/heads/import-master
Commit: a24be94aa71172a0bd4af78514a2e201c929675d
Parents: 66f4148
Author: Jason David Davies <jasondavies@apache.org>
Authored: Tue Jan 12 19:29:23 2010 +0000
Committer: Jason David Davies <jasondavies@apache.org>
Committed: Tue Jan 12 19:29:23 2010 +0000

----------------------------------------------------------------------
 oauth_hmac_sha1.erl | 2 +-
 oauth_plaintext.erl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-oauth/blob/a24be94a/oauth_hmac_sha1.erl
----------------------------------------------------------------------
diff --git a/oauth_hmac_sha1.erl b/oauth_hmac_sha1.erl
index 69064ed..79d59f3 100644
--- a/oauth_hmac_sha1.erl
+++ b/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).

http://git-wip-us.apache.org/repos/asf/couchdb-oauth/blob/a24be94a/oauth_plaintext.erl
----------------------------------------------------------------------
diff --git a/oauth_plaintext.erl b/oauth_plaintext.erl
index d8085e0..41a1e9b 100644
--- a/oauth_plaintext.erl
+++ b/oauth_plaintext.erl
@@ -7,4 +7,4 @@ signature(CS, TS) ->
   oauth_uri:calate("&", [CS, TS]).
 
 verify(Signature, CS, TS) ->
-  Signature =:= signature(CS, TS).
+  couch_util:verify(signature(CS, TS), Signature).


Mime
View raw message