Completed
Push — master ( 8024f3...e355ed )
by Michiel
03:33 queued 14s
created
library/tiqr/Tiqr/UserSecretStorage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      *
37 37
      * @return Tiqr_UserSecretStorage_Interface
38 38
      */
39
-    public static function getSecretStorage($type="file", $options=array())
39
+    public static function getSecretStorage($type = "file", $options = array())
40 40
     {
41 41
         switch ($type) {
42 42
             case "file":
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                 if (!isset($type)) {
60 60
                     throw new Exception('Class name not set');
61 61
                 } elseif (!class_exists($type)) {
62
-                    throw new Exception('Class not found: ' . var_export($type, TRUE));
62
+                    throw new Exception('Class not found: '.var_export($type, TRUE));
63 63
                 }
64 64
                 $instance = new $type($options);
65 65
         }
Please login to merge, or discard this patch.
library/tiqr/Tiqr/Message/Exception/MismatchSenderId.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      * @param boolean   $temporary  temporary failure?
36 36
      * @param Exception $parent     parent exception
37 37
      */
38
-    public function __construct($message, $temporary=false, Exception $parent=null)
38
+    public function __construct($message, $temporary = false, Exception $parent = null)
39 39
     {
40 40
         parent::__construct($message, $parent);
41 41
         $this->_temporary = $temporary;
Please login to merge, or discard this patch.
library/tiqr/Tiqr/Message/Exception/SendFailure.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      * @param boolean   $temporary  temporary failure?
36 36
      * @param Exception $parent     parent exception
37 37
      */
38
-    public function __construct($message, $temporary=false, Exception $parent=null)
38
+    public function __construct($message, $temporary = false, Exception $parent = null)
39 39
     {
40 40
         parent::__construct($message, $parent);
41 41
         $this->_temporary = $temporary;
Please login to merge, or discard this patch.
library/tiqr/Tiqr/Message/GCM.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
         }
103 103
 
104 104
         if ($error != null) {
105
-            throw new Tiqr_Message_Exception_SendFailure("Error in GCM response: " . $error, true);
105
+            throw new Tiqr_Message_Exception_SendFailure("Error in GCM response: ".$error, true);
106 106
         }
107 107
 
108 108
     }
Please login to merge, or discard this patch.
library/tiqr/Tiqr/Message/Exception.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
      * @param string    $message    exception message
30 30
      * @param Exception $parent     parent exception
31 31
      */
32
-     public function __construct($message, $parent=null)
33
-     {
34
-         parent::__construct($message, 0, $parent);
35
-     }
32
+        public function __construct($message, $parent=null)
33
+        {
34
+            parent::__construct($message, 0, $parent);
35
+        }
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * @param string    $message    exception message
30 30
      * @param Exception $parent     parent exception
31 31
      */
32
-     public function __construct($message, $parent=null)
32
+     public function __construct($message, $parent = null)
33 33
      {
34 34
          parent::__construct($message, 0, $parent);
35 35
      }
Please login to merge, or discard this patch.
library/tiqr/OATH/OCRATest.php 2 patches
Indentation   +115 added lines, -115 removed lines patch added patch discarded remove patch
@@ -4,127 +4,127 @@
 block discarded – undo
4 4
 
5 5
 class OATH_OCRATest extends PHPUnit_Framework_TestCase {
6 6
 
7
-	/**
8
-	 * @dataProvider RFCVectorsProvider
9
-	 */
10
-	public function testRFCVectors($ocrasuite, $key, $datainput, $expected_result) {
11
-		$ocra = new OATH_OCRA($ocrasuite, $key, NULL, $datainput['Q']);
12
-		$ocra->setKey($key, 'hexstring');
13
-		$ocra->setQuestion($datainput['Q']);
14
-		if (isset($datainput['C'])) {
15
-			$ocra->setCounter($datainput['C']);
16
-		}
17
-		if (isset($datainput['P'])) {
18
-			$ocra->setPin($datainput['P']);
19
-		} elseif (isset($datainput['P:hexdigest'])) {
20
-			$ocra->setPin($datainput['P:hexdigest'], 'hexdigest');
21
-		}
22
-		if (isset($datainput['T'])) {
23
-			$ocra->setTimestamp($datainput['T']);
24
-		}
25
-		$this->assertTrue($ocra->verifyResponse($expected_result));
26
-	}
7
+    /**
8
+     * @dataProvider RFCVectorsProvider
9
+     */
10
+    public function testRFCVectors($ocrasuite, $key, $datainput, $expected_result) {
11
+        $ocra = new OATH_OCRA($ocrasuite, $key, NULL, $datainput['Q']);
12
+        $ocra->setKey($key, 'hexstring');
13
+        $ocra->setQuestion($datainput['Q']);
14
+        if (isset($datainput['C'])) {
15
+            $ocra->setCounter($datainput['C']);
16
+        }
17
+        if (isset($datainput['P'])) {
18
+            $ocra->setPin($datainput['P']);
19
+        } elseif (isset($datainput['P:hexdigest'])) {
20
+            $ocra->setPin($datainput['P:hexdigest'], 'hexdigest');
21
+        }
22
+        if (isset($datainput['T'])) {
23
+            $ocra->setTimestamp($datainput['T']);
24
+        }
25
+        $this->assertTrue($ocra->verifyResponse($expected_result));
26
+    }
27 27
 
28 28
 
29
-	public function RFCVectorsProvider() {
30
-		$pin = '1234';
31
-		$pin_sha1 = '7110eda4d09e062aa5e4a390b0a572ac0d2c0220';
29
+    public function RFCVectorsProvider() {
30
+        $pin = '1234';
31
+        $pin_sha1 = '7110eda4d09e062aa5e4a390b0a572ac0d2c0220';
32 32
 
33
-		$key20 = '3132333435363738393031323334353637383930';
34
-		$key32 = '3132333435363738393031323334353637383930313233343536373839303132';
35
-		$key64 = '31323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334';
33
+        $key20 = '3132333435363738393031323334353637383930';
34
+        $key32 = '3132333435363738393031323334353637383930313233343536373839303132';
35
+        $key64 = '31323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334';
36 36
 
37
-		$tests = array(
38
-			array(
39
-				'ocrasuite' => 'OCRA-1:HOTP-SHA1-6:QN08',
40
-				'key' => $key20,
41
-				'vectors' => array(
42
-					array('params' => array( 'Q' => '00000000' ), 'result' => '237653' ),
43
-					array('params' => array( 'Q' => '11111111' ), 'result' => '243178' ),
44
-					array('params' => array( 'Q' => '22222222' ), 'result' => '653583' ),
45
-					array('params' => array( 'Q' => '33333333' ), 'result' => '740991' ),
46
-					array('params' => array( 'Q' => '44444444' ), 'result' => '608993' ),
47
-					array('params' => array( 'Q' => '55555555' ), 'result' => '388898' ),
48
-					array('params' => array( 'Q' => '66666666' ), 'result' => '816933' ),
49
-					array('params' => array( 'Q' => '77777777' ), 'result' => '224598' ),
50
-					array('params' => array( 'Q' => '88888888' ), 'result' => '750600' ),
51
-					array('params' => array( 'Q' => '99999999' ), 'result' => '294470' ),
52
-				)
53
-			),
54
-			array(
55
-				'ocrasuite' => 'OCRA-1:HOTP-SHA256-8:C-QN08-PSHA1',
56
-				'key' => $key32,
57
-				'pin_sha1' => $pin_sha1,
58
-				'vectors' => array(
59
-					array('params' => array( 'C' => 0, 'Q' => '12345678' ), 'result' => '65347737' ),
60
-					array('params' => array( 'C' => 1, 'Q' => '12345678' ), 'result' => '86775851' ),
61
-					array('params' => array( 'C' => 2, 'Q' => '12345678' ), 'result' => '78192410' ),
62
-					array('params' => array( 'C' => 3, 'Q' => '12345678' ), 'result' => '71565254' ),
63
-					array('params' => array( 'C' => 4, 'Q' => '12345678' ), 'result' => '10104329' ),
64
-					array('params' => array( 'C' => 5, 'Q' => '12345678' ), 'result' => '65983500' ),
65
-					array('params' => array( 'C' => 6, 'Q' => '12345678' ), 'result' => '70069104' ),
66
-					array('params' => array( 'C' => 7, 'Q' => '12345678' ), 'result' => '91771096' ),
67
-					array('params' => array( 'C' => 8, 'Q' => '12345678' ), 'result' => '75011558' ),
68
-					array('params' => array( 'C' => 9, 'Q' => '12345678' ), 'result' => '08522129' ),
69
-				)
70
-			),
71
-			array(
72
-				'ocrasuite' => 'OCRA-1:HOTP-SHA256-8:QN08-PSHA1',
73
-				'key' => $key32,
74
-				'pin_sha1' => $pin_sha1,
75
-				'vectors' => array(
76
-					array('params' => array( 'Q' => '00000000' ), 'result' => '83238735' ),
77
-					array('params' => array( 'Q' => '11111111' ), 'result' => '01501458' ),
78
-					array('params' => array( 'Q' => '22222222' ), 'result' => '17957585' ),
79
-					array('params' => array( 'Q' => '33333333' ), 'result' => '86776967' ),
80
-					array('params' => array( 'Q' => '44444444' ), 'result' => '86807031' ),
81
-				)
82
-			),
83
-			array(
84
-				'ocrasuite' => 'OCRA-1:HOTP-SHA512-8:C-QN08',
85
-				'key' => $key64,
86
-				'vectors' => array(
87
-					array('params' => array( 'C' => '00000', 'Q' => '00000000' ), 'result' => '07016083' ),
88
-					array('params' => array( 'C' => '00001', 'Q' => '11111111' ), 'result' => '63947962' ),
89
-					array('params' => array( 'C' => '00002', 'Q' => '22222222' ), 'result' => '70123924' ),
90
-					array('params' => array( 'C' => '00003', 'Q' => '33333333' ), 'result' => '25341727' ),
91
-					array('params' => array( 'C' => '00004', 'Q' => '44444444' ), 'result' => '33203315' ),
92
-					array('params' => array( 'C' => '00005', 'Q' => '55555555' ), 'result' => '34205738' ),
93
-					array('params' => array( 'C' => '00006', 'Q' => '66666666' ), 'result' => '44343969' ),
94
-					array('params' => array( 'C' => '00007', 'Q' => '77777777' ), 'result' => '51946085' ),
95
-					array('params' => array( 'C' => '00008', 'Q' => '88888888' ), 'result' => '20403879' ),
96
-					array('params' => array( 'C' => '00009', 'Q' => '99999999' ), 'result' => '31409299' ),
97
-				)
98
-			),
99
-			array(
100
-				'ocrasuite' => 'OCRA-1:HOTP-SHA512-8:QN08-T1M',
101
-				'key' => $key64,
102
-				'vectors' => array(
103
-					array('params' => array( 'Q' => '00000000', 'T' => intval('132d0b6', 16) ), 'result' => '95209754' ),
104
-					array('params' => array( 'Q' => '11111111', 'T' => intval('132d0b6', 16) ), 'result' => '55907591' ),
105
-					array('params' => array( 'Q' => '22222222', 'T' => intval('132d0b6', 16) ), 'result' => '22048402' ),
106
-					array('params' => array( 'Q' => '33333333', 'T' => intval('132d0b6', 16) ), 'result' => '24218844' ),
107
-					array('params' => array( 'Q' => '44444444', 'T' => intval('132d0b6', 16) ), 'result' => '36209546' ),
108
-				)
109
-			),
110
-		);
37
+        $tests = array(
38
+            array(
39
+                'ocrasuite' => 'OCRA-1:HOTP-SHA1-6:QN08',
40
+                'key' => $key20,
41
+                'vectors' => array(
42
+                    array('params' => array( 'Q' => '00000000' ), 'result' => '237653' ),
43
+                    array('params' => array( 'Q' => '11111111' ), 'result' => '243178' ),
44
+                    array('params' => array( 'Q' => '22222222' ), 'result' => '653583' ),
45
+                    array('params' => array( 'Q' => '33333333' ), 'result' => '740991' ),
46
+                    array('params' => array( 'Q' => '44444444' ), 'result' => '608993' ),
47
+                    array('params' => array( 'Q' => '55555555' ), 'result' => '388898' ),
48
+                    array('params' => array( 'Q' => '66666666' ), 'result' => '816933' ),
49
+                    array('params' => array( 'Q' => '77777777' ), 'result' => '224598' ),
50
+                    array('params' => array( 'Q' => '88888888' ), 'result' => '750600' ),
51
+                    array('params' => array( 'Q' => '99999999' ), 'result' => '294470' ),
52
+                )
53
+            ),
54
+            array(
55
+                'ocrasuite' => 'OCRA-1:HOTP-SHA256-8:C-QN08-PSHA1',
56
+                'key' => $key32,
57
+                'pin_sha1' => $pin_sha1,
58
+                'vectors' => array(
59
+                    array('params' => array( 'C' => 0, 'Q' => '12345678' ), 'result' => '65347737' ),
60
+                    array('params' => array( 'C' => 1, 'Q' => '12345678' ), 'result' => '86775851' ),
61
+                    array('params' => array( 'C' => 2, 'Q' => '12345678' ), 'result' => '78192410' ),
62
+                    array('params' => array( 'C' => 3, 'Q' => '12345678' ), 'result' => '71565254' ),
63
+                    array('params' => array( 'C' => 4, 'Q' => '12345678' ), 'result' => '10104329' ),
64
+                    array('params' => array( 'C' => 5, 'Q' => '12345678' ), 'result' => '65983500' ),
65
+                    array('params' => array( 'C' => 6, 'Q' => '12345678' ), 'result' => '70069104' ),
66
+                    array('params' => array( 'C' => 7, 'Q' => '12345678' ), 'result' => '91771096' ),
67
+                    array('params' => array( 'C' => 8, 'Q' => '12345678' ), 'result' => '75011558' ),
68
+                    array('params' => array( 'C' => 9, 'Q' => '12345678' ), 'result' => '08522129' ),
69
+                )
70
+            ),
71
+            array(
72
+                'ocrasuite' => 'OCRA-1:HOTP-SHA256-8:QN08-PSHA1',
73
+                'key' => $key32,
74
+                'pin_sha1' => $pin_sha1,
75
+                'vectors' => array(
76
+                    array('params' => array( 'Q' => '00000000' ), 'result' => '83238735' ),
77
+                    array('params' => array( 'Q' => '11111111' ), 'result' => '01501458' ),
78
+                    array('params' => array( 'Q' => '22222222' ), 'result' => '17957585' ),
79
+                    array('params' => array( 'Q' => '33333333' ), 'result' => '86776967' ),
80
+                    array('params' => array( 'Q' => '44444444' ), 'result' => '86807031' ),
81
+                )
82
+            ),
83
+            array(
84
+                'ocrasuite' => 'OCRA-1:HOTP-SHA512-8:C-QN08',
85
+                'key' => $key64,
86
+                'vectors' => array(
87
+                    array('params' => array( 'C' => '00000', 'Q' => '00000000' ), 'result' => '07016083' ),
88
+                    array('params' => array( 'C' => '00001', 'Q' => '11111111' ), 'result' => '63947962' ),
89
+                    array('params' => array( 'C' => '00002', 'Q' => '22222222' ), 'result' => '70123924' ),
90
+                    array('params' => array( 'C' => '00003', 'Q' => '33333333' ), 'result' => '25341727' ),
91
+                    array('params' => array( 'C' => '00004', 'Q' => '44444444' ), 'result' => '33203315' ),
92
+                    array('params' => array( 'C' => '00005', 'Q' => '55555555' ), 'result' => '34205738' ),
93
+                    array('params' => array( 'C' => '00006', 'Q' => '66666666' ), 'result' => '44343969' ),
94
+                    array('params' => array( 'C' => '00007', 'Q' => '77777777' ), 'result' => '51946085' ),
95
+                    array('params' => array( 'C' => '00008', 'Q' => '88888888' ), 'result' => '20403879' ),
96
+                    array('params' => array( 'C' => '00009', 'Q' => '99999999' ), 'result' => '31409299' ),
97
+                )
98
+            ),
99
+            array(
100
+                'ocrasuite' => 'OCRA-1:HOTP-SHA512-8:QN08-T1M',
101
+                'key' => $key64,
102
+                'vectors' => array(
103
+                    array('params' => array( 'Q' => '00000000', 'T' => intval('132d0b6', 16) ), 'result' => '95209754' ),
104
+                    array('params' => array( 'Q' => '11111111', 'T' => intval('132d0b6', 16) ), 'result' => '55907591' ),
105
+                    array('params' => array( 'Q' => '22222222', 'T' => intval('132d0b6', 16) ), 'result' => '22048402' ),
106
+                    array('params' => array( 'Q' => '33333333', 'T' => intval('132d0b6', 16) ), 'result' => '24218844' ),
107
+                    array('params' => array( 'Q' => '44444444', 'T' => intval('132d0b6', 16) ), 'result' => '36209546' ),
108
+                )
109
+            ),
110
+        );
111 111
 
112
-		$data = array();
112
+        $data = array();
113 113
 
114
-		foreach($tests as $test) {
115
-			$ocrasuite = $test['ocrasuite'];
116
-			foreach($test['vectors'] as $vector) {
117
-				$datainput = $vector['params'];
118
-				if (isset($test['pin'])) {
119
-					$datainput['P'] = $test['pin'];
120
-				} elseif (isset($test['pin_sha1'])) {
121
-					$datainput['P:hexdigest'] = $test['pin_sha1'];
122
-				}
123
-				$data[] = array($ocrasuite, $test['key'], $datainput, $vector['result']);
124
-			}
125
-		}
114
+        foreach($tests as $test) {
115
+            $ocrasuite = $test['ocrasuite'];
116
+            foreach($test['vectors'] as $vector) {
117
+                $datainput = $vector['params'];
118
+                if (isset($test['pin'])) {
119
+                    $datainput['P'] = $test['pin'];
120
+                } elseif (isset($test['pin_sha1'])) {
121
+                    $datainput['P:hexdigest'] = $test['pin_sha1'];
122
+                }
123
+                $data[] = array($ocrasuite, $test['key'], $datainput, $vector['result']);
124
+            }
125
+        }
126 126
 
127
-		return $data;
128
-	}
127
+        return $data;
128
+    }
129 129
 
130 130
 }
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once(realpath(dirname(__FILE__) . '/OCRA.php'));
3
+require_once(realpath(dirname(__FILE__).'/OCRA.php'));
4 4
 
5 5
 class OATH_OCRATest extends PHPUnit_Framework_TestCase {
6 6
 
@@ -39,16 +39,16 @@  discard block
 block discarded – undo
39 39
 				'ocrasuite' => 'OCRA-1:HOTP-SHA1-6:QN08',
40 40
 				'key' => $key20,
41 41
 				'vectors' => array(
42
-					array('params' => array( 'Q' => '00000000' ), 'result' => '237653' ),
43
-					array('params' => array( 'Q' => '11111111' ), 'result' => '243178' ),
44
-					array('params' => array( 'Q' => '22222222' ), 'result' => '653583' ),
45
-					array('params' => array( 'Q' => '33333333' ), 'result' => '740991' ),
46
-					array('params' => array( 'Q' => '44444444' ), 'result' => '608993' ),
47
-					array('params' => array( 'Q' => '55555555' ), 'result' => '388898' ),
48
-					array('params' => array( 'Q' => '66666666' ), 'result' => '816933' ),
49
-					array('params' => array( 'Q' => '77777777' ), 'result' => '224598' ),
50
-					array('params' => array( 'Q' => '88888888' ), 'result' => '750600' ),
51
-					array('params' => array( 'Q' => '99999999' ), 'result' => '294470' ),
42
+					array('params' => array('Q' => '00000000'), 'result' => '237653'),
43
+					array('params' => array('Q' => '11111111'), 'result' => '243178'),
44
+					array('params' => array('Q' => '22222222'), 'result' => '653583'),
45
+					array('params' => array('Q' => '33333333'), 'result' => '740991'),
46
+					array('params' => array('Q' => '44444444'), 'result' => '608993'),
47
+					array('params' => array('Q' => '55555555'), 'result' => '388898'),
48
+					array('params' => array('Q' => '66666666'), 'result' => '816933'),
49
+					array('params' => array('Q' => '77777777'), 'result' => '224598'),
50
+					array('params' => array('Q' => '88888888'), 'result' => '750600'),
51
+					array('params' => array('Q' => '99999999'), 'result' => '294470'),
52 52
 				)
53 53
 			),
54 54
 			array(
@@ -56,16 +56,16 @@  discard block
 block discarded – undo
56 56
 				'key' => $key32,
57 57
 				'pin_sha1' => $pin_sha1,
58 58
 				'vectors' => array(
59
-					array('params' => array( 'C' => 0, 'Q' => '12345678' ), 'result' => '65347737' ),
60
-					array('params' => array( 'C' => 1, 'Q' => '12345678' ), 'result' => '86775851' ),
61
-					array('params' => array( 'C' => 2, 'Q' => '12345678' ), 'result' => '78192410' ),
62
-					array('params' => array( 'C' => 3, 'Q' => '12345678' ), 'result' => '71565254' ),
63
-					array('params' => array( 'C' => 4, 'Q' => '12345678' ), 'result' => '10104329' ),
64
-					array('params' => array( 'C' => 5, 'Q' => '12345678' ), 'result' => '65983500' ),
65
-					array('params' => array( 'C' => 6, 'Q' => '12345678' ), 'result' => '70069104' ),
66
-					array('params' => array( 'C' => 7, 'Q' => '12345678' ), 'result' => '91771096' ),
67
-					array('params' => array( 'C' => 8, 'Q' => '12345678' ), 'result' => '75011558' ),
68
-					array('params' => array( 'C' => 9, 'Q' => '12345678' ), 'result' => '08522129' ),
59
+					array('params' => array('C' => 0, 'Q' => '12345678'), 'result' => '65347737'),
60
+					array('params' => array('C' => 1, 'Q' => '12345678'), 'result' => '86775851'),
61
+					array('params' => array('C' => 2, 'Q' => '12345678'), 'result' => '78192410'),
62
+					array('params' => array('C' => 3, 'Q' => '12345678'), 'result' => '71565254'),
63
+					array('params' => array('C' => 4, 'Q' => '12345678'), 'result' => '10104329'),
64
+					array('params' => array('C' => 5, 'Q' => '12345678'), 'result' => '65983500'),
65
+					array('params' => array('C' => 6, 'Q' => '12345678'), 'result' => '70069104'),
66
+					array('params' => array('C' => 7, 'Q' => '12345678'), 'result' => '91771096'),
67
+					array('params' => array('C' => 8, 'Q' => '12345678'), 'result' => '75011558'),
68
+					array('params' => array('C' => 9, 'Q' => '12345678'), 'result' => '08522129'),
69 69
 				)
70 70
 			),
71 71
 			array(
@@ -73,47 +73,47 @@  discard block
 block discarded – undo
73 73
 				'key' => $key32,
74 74
 				'pin_sha1' => $pin_sha1,
75 75
 				'vectors' => array(
76
-					array('params' => array( 'Q' => '00000000' ), 'result' => '83238735' ),
77
-					array('params' => array( 'Q' => '11111111' ), 'result' => '01501458' ),
78
-					array('params' => array( 'Q' => '22222222' ), 'result' => '17957585' ),
79
-					array('params' => array( 'Q' => '33333333' ), 'result' => '86776967' ),
80
-					array('params' => array( 'Q' => '44444444' ), 'result' => '86807031' ),
76
+					array('params' => array('Q' => '00000000'), 'result' => '83238735'),
77
+					array('params' => array('Q' => '11111111'), 'result' => '01501458'),
78
+					array('params' => array('Q' => '22222222'), 'result' => '17957585'),
79
+					array('params' => array('Q' => '33333333'), 'result' => '86776967'),
80
+					array('params' => array('Q' => '44444444'), 'result' => '86807031'),
81 81
 				)
82 82
 			),
83 83
 			array(
84 84
 				'ocrasuite' => 'OCRA-1:HOTP-SHA512-8:C-QN08',
85 85
 				'key' => $key64,
86 86
 				'vectors' => array(
87
-					array('params' => array( 'C' => '00000', 'Q' => '00000000' ), 'result' => '07016083' ),
88
-					array('params' => array( 'C' => '00001', 'Q' => '11111111' ), 'result' => '63947962' ),
89
-					array('params' => array( 'C' => '00002', 'Q' => '22222222' ), 'result' => '70123924' ),
90
-					array('params' => array( 'C' => '00003', 'Q' => '33333333' ), 'result' => '25341727' ),
91
-					array('params' => array( 'C' => '00004', 'Q' => '44444444' ), 'result' => '33203315' ),
92
-					array('params' => array( 'C' => '00005', 'Q' => '55555555' ), 'result' => '34205738' ),
93
-					array('params' => array( 'C' => '00006', 'Q' => '66666666' ), 'result' => '44343969' ),
94
-					array('params' => array( 'C' => '00007', 'Q' => '77777777' ), 'result' => '51946085' ),
95
-					array('params' => array( 'C' => '00008', 'Q' => '88888888' ), 'result' => '20403879' ),
96
-					array('params' => array( 'C' => '00009', 'Q' => '99999999' ), 'result' => '31409299' ),
87
+					array('params' => array('C' => '00000', 'Q' => '00000000'), 'result' => '07016083'),
88
+					array('params' => array('C' => '00001', 'Q' => '11111111'), 'result' => '63947962'),
89
+					array('params' => array('C' => '00002', 'Q' => '22222222'), 'result' => '70123924'),
90
+					array('params' => array('C' => '00003', 'Q' => '33333333'), 'result' => '25341727'),
91
+					array('params' => array('C' => '00004', 'Q' => '44444444'), 'result' => '33203315'),
92
+					array('params' => array('C' => '00005', 'Q' => '55555555'), 'result' => '34205738'),
93
+					array('params' => array('C' => '00006', 'Q' => '66666666'), 'result' => '44343969'),
94
+					array('params' => array('C' => '00007', 'Q' => '77777777'), 'result' => '51946085'),
95
+					array('params' => array('C' => '00008', 'Q' => '88888888'), 'result' => '20403879'),
96
+					array('params' => array('C' => '00009', 'Q' => '99999999'), 'result' => '31409299'),
97 97
 				)
98 98
 			),
99 99
 			array(
100 100
 				'ocrasuite' => 'OCRA-1:HOTP-SHA512-8:QN08-T1M',
101 101
 				'key' => $key64,
102 102
 				'vectors' => array(
103
-					array('params' => array( 'Q' => '00000000', 'T' => intval('132d0b6', 16) ), 'result' => '95209754' ),
104
-					array('params' => array( 'Q' => '11111111', 'T' => intval('132d0b6', 16) ), 'result' => '55907591' ),
105
-					array('params' => array( 'Q' => '22222222', 'T' => intval('132d0b6', 16) ), 'result' => '22048402' ),
106
-					array('params' => array( 'Q' => '33333333', 'T' => intval('132d0b6', 16) ), 'result' => '24218844' ),
107
-					array('params' => array( 'Q' => '44444444', 'T' => intval('132d0b6', 16) ), 'result' => '36209546' ),
103
+					array('params' => array('Q' => '00000000', 'T' => intval('132d0b6', 16)), 'result' => '95209754'),
104
+					array('params' => array('Q' => '11111111', 'T' => intval('132d0b6', 16)), 'result' => '55907591'),
105
+					array('params' => array('Q' => '22222222', 'T' => intval('132d0b6', 16)), 'result' => '22048402'),
106
+					array('params' => array('Q' => '33333333', 'T' => intval('132d0b6', 16)), 'result' => '24218844'),
107
+					array('params' => array('Q' => '44444444', 'T' => intval('132d0b6', 16)), 'result' => '36209546'),
108 108
 				)
109 109
 			),
110 110
 		);
111 111
 
112 112
 		$data = array();
113 113
 
114
-		foreach($tests as $test) {
114
+		foreach ($tests as $test) {
115 115
 			$ocrasuite = $test['ocrasuite'];
116
-			foreach($test['vectors'] as $vector) {
116
+			foreach ($test['vectors'] as $vector) {
117 117
 				$datainput = $vector['params'];
118 118
 				if (isset($test['pin'])) {
119 119
 					$datainput['P'] = $test['pin'];
Please login to merge, or discard this patch.