Keep consistent indentation
Project: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/commit/3ae1cc7e Tree: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/tree/3ae1cc7e Diff: http://git-wip-us.apache.org/repos/asf/couchdb-oauth/diff/3ae1cc7e Branch: refs/heads/import Commit: 3ae1cc7edf0f3065a7c5f365d95f10bbd1459b45 Parents: ed213dd Author: Tim Fletcher <[email protected]> Authored: Mon Oct 17 11:57:33 2011 +0100 Committer: Tim Fletcher <[email protected]> Committed: Mon Oct 17 11:57:33 2011 +0100 ---------------------------------------------------------------------- src/oauth.erl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-oauth/blob/3ae1cc7e/src/oauth.erl ---------------------------------------------------------------------- diff --git a/src/oauth.erl b/src/oauth.erl index 18c428d..61e4a0a 100644 --- a/src/oauth.erl +++ b/src/oauth.erl @@ -145,20 +145,20 @@ rsa_sha1_verify(Signature, BaseString, Consumer) -> Key = read_cert_key(consumer_secret(Consumer)), public_key:verify(to_binary(BaseString), sha, base64:decode(Signature), Key). -verify_in_constant_time([X|RestX], [Y|RestY], Result) -> - verify_in_constant_time(RestX, RestY, (X bxor Y) bor Result); -verify_in_constant_time([], [], Result) -> - Result == 0. - verify_in_constant_time(<<X/binary>>, <<Y/binary>>) -> - verify_in_constant_time(binary_to_list(X), binary_to_list(Y)); + verify_in_constant_time(binary_to_list(X), binary_to_list(Y)); verify_in_constant_time(X, Y) when is_list(X) and is_list(Y) -> - case length(X) == length(Y) of - true -> - verify_in_constant_time(X, Y, 0); - false -> - false - end. + case length(X) == length(Y) of + true -> + verify_in_constant_time(X, Y, 0); + false -> + false + end. + +verify_in_constant_time([X | RestX], [Y | RestY], Result) -> + verify_in_constant_time(RestX, RestY, (X bxor Y) bor Result); +verify_in_constant_time([], [], Result) -> + Result == 0. signature_base_string(HttpMethod, URL, Params) -> uri_join([HttpMethod, uri_normalize(URL), params_encode(Params)]).
