@@ -52,10 +52,10 @@ discard block |
||
52 | 52 | { |
53 | 53 | $bin = base_convert($number, $base, 2); |
54 | 54 | $res = ""; |
55 | - $len = (int)ceil(strlen($bin) / 8) * 8; |
|
55 | + $len = (int) ceil(strlen($bin) / 8) * 8; |
|
56 | 56 | $bin = str_pad($bin, $len, "0", STR_PAD_LEFT); |
57 | - for ($i = ($len-8); $i >= 0; $i -= 8) { |
|
58 | - $res = chr((int)base_convert(substr($bin, $i, 8), 2, 10)) . $res; |
|
57 | + for ($i = ($len - 8); $i >= 0; $i -= 8) { |
|
58 | + $res = chr((int) base_convert(substr($bin, $i, 8), 2, 10)).$res; |
|
59 | 59 | } |
60 | 60 | return $res; |
61 | 61 | } |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | 'rsaEncryption' => '1.2.840.113549.1.1.1', |
215 | 215 | 'md2WithRSAEncryption' => '1.2.840.113549.1.1.2', |
216 | 216 | 'md5WithRSAEncryption' => '1.2.840.113549.1.1.4', |
217 | - 'sha1WithRSAEncryption' => ['1.2.840.113549.1.1.5', '1.3.14.3.2.29'], |
|
217 | + 'sha1WithRSAEncryption' => [ '1.2.840.113549.1.1.5', '1.3.14.3.2.29' ], |
|
218 | 218 | 'dhpublicnumber' => '1.2.840.10046.2.1', |
219 | 219 | 'keyExchangeAlgorithm' => '2.16.840.1.101.2.1.1.22', |
220 | 220 | 'ansi-X9-62' => '1.2.840.10045', |
@@ -318,9 +318,9 @@ discard block |
||
318 | 318 | } |
319 | 319 | public static function TextToOID($text) |
320 | 320 | { |
321 | - $res = static::$oids[$text] ?? null; |
|
321 | + $res = static::$oids[ $text ] ?? null; |
|
322 | 322 | if (is_array($res)) { |
323 | - $res = $res[0]; |
|
323 | + $res = $res[ 0 ]; |
|
324 | 324 | } |
325 | 325 | return $res ?? $text; |
326 | 326 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | 'tag' => ASN1::TYPE_INTEGER, |
49 | 49 | 'name' => 0, |
50 | 50 | 'implicit' => false, |
51 | - 'map' => [1=>'v1'], |
|
51 | + 'map' => [ 1=>'v1' ], |
|
52 | 52 | 'optional' => true |
53 | 53 | ], |
54 | 54 | 'requestorName' => [ |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | ] |
87 | 87 | ] |
88 | 88 | ], |
89 | - 'extensions' => Common::extensions() + ['name' => 2, 'implicit' => false, 'optional' => true ] |
|
89 | + 'extensions' => Common::extensions() + [ 'name' => 2, 'implicit' => false, 'optional' => true ] |
|
90 | 90 | ] |
91 | 91 | ], |
92 | 92 | 'signature' => [ |