diff options
author | Jason David Davies <jasondavies@apache.org> | 2010-01-12 19:29:23 +0000 |
---|---|---|
committer | Jason David Davies <jasondavies@apache.org> | 2010-01-12 19:29:23 +0000 |
commit | b9f59ca2986075112ff1de42320168affa10921e (patch) | |
tree | 5e2a443b255803cd1c4f75689055db2099fd9c4e /src/erlang-oauth | |
parent | 84fd4ae77ef7b4c53a9159394747676a1c65ab51 (diff) |
Add utility for verifying hashes.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@898477 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/erlang-oauth')
-rw-r--r-- | src/erlang-oauth/oauth_hmac_sha1.erl | 2 | ||||
-rw-r--r-- | src/erlang-oauth/oauth_plaintext.erl | 2 |
2 files changed, 2 insertions, 2 deletions
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). diff --git a/src/erlang-oauth/oauth_plaintext.erl b/src/erlang-oauth/oauth_plaintext.erl index d8085e02..41a1e9b2 100644 --- a/src/erlang-oauth/oauth_plaintext.erl +++ b/src/erlang-oauth/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). |