Skip to content

Commit bf34629

Browse files
author
Adrian Slade
committed
HMAC_SHA1 to HMACSHA1
1 parent a35e215 commit bf34629

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

lib/OAuth/SignatureMethod/HMAC_SHA1.php lib/OAuth/SignatureMethod/HMACSHA1.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* character (ASCII code 38) even if empty.
99
* - Chapter 9.2 ("HMAC-SHA1")
1010
*/
11-
class HMAC_SHA1 extends SignatureMethod {
11+
class HMACSHA1 extends SignatureMethod {
1212
function get_name() {
1313
return "HMAC-SHA1";
1414
}

tests/OAuthRequestTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public function testBuildSignature() {
291291
$cons = new Consumer('key', 'kd94hf93k423kf44');
292292
$token = new Token('token', 'pfkkdhi9sl3r4s00');
293293

294-
$hmac = new OAuth\SignatureMethod\HMAC_SHA1();
294+
$hmac = new OAuth\SignatureMethod\HMACSHA1();
295295
$plaintext = new OAuth\SignatureMethod\PLAINTEXT();
296296

297297
$this->assertEquals('tR3+Ty81lMeYAr/Fid0kMTYa/WM=', $r->build_signature($hmac, $cons, $token));
@@ -308,7 +308,7 @@ public function testSign() {
308308
$cons = new Consumer('key', 'kd94hf93k423kf44');
309309
$token = new Token('token', 'pfkkdhi9sl3r4s00');
310310

311-
$hmac = new OAuth\SignatureMethod\HMAC_SHA1();
311+
$hmac = new OAuth\SignatureMethod\HMACSHA1();
312312
$plaintext = new OAuth\SignatureMethod\PLAINTEXT();
313313

314314
// We need to test both what the parameter is, and how the serialized request is..

tests/OAuthServerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function setUp() {
2626
$this->request_token = new Token('requestkey', 'requestsecret');
2727
$this->access_token = new Token('accesskey', 'accesssecret');
2828

29-
$this->hmac_sha1 = new OAuth\SignatureMethod\HMAC_SHA1();
29+
$this->hmac_sha1 = new OAuth\SignatureMethod\HMACSHA1();
3030
$this->plaintext = new OAuth\SignatureMethod\PLAINTEXT();
3131

3232
$this->server = new \OAuth\Server( new Mock_OAuthDataStore() );

tests/OAuthSignatureMethodHmacSha1Test.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
use OAuth\SignatureMethod\HMAC_SHA1;
2+
use OAuth\SignatureMethod\HMACSHA1;
33
use OAuth\Consumer;
44
use OAuth\Token;
55

@@ -10,7 +10,7 @@ class SignatureMethodHmacSha1Test extends PHPUnit_Framework_TestCase {
1010
private $method;
1111

1212
public function setUp() {
13-
$this->method = new HMAC_SHA1();
13+
$this->method = new HMACSHA1();
1414
}
1515

1616
public function testIdentifyAsHmacSha1() {

tests/common.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
require dirname(__FILE__).'/../lib/OAuth/Util.php';
1212
require dirname(__FILE__).'/../lib/OAuth/SignatureMethod/SignatureMethod.php';
1313
require dirname(__FILE__).'/../lib/OAuth/SignatureMethod/RSA_SHA1.php';
14-
require dirname(__FILE__).'/../lib/OAuth/SignatureMethod/HMAC_SHA1.php';
14+
require dirname(__FILE__).'/../lib/OAuth/SignatureMethod/HMACSHA1.php';
1515
require dirname(__FILE__).'/../lib/OAuth/SignatureMethod/PLAINTEXT.php';
1616

1717
/**

0 commit comments

Comments
 (0)