Subversion Repositories php_utils

Rev

Rev 43 | Rev 45 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 43 Rev 44
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
/*
3
/*
4
 * ISO/IEC 7816-5 Application Identifier decoder for PHP
4
 * ISO/IEC 7816-5 Application Identifier decoder for PHP
5
 * Copyright 2022 Daniel Marschall, ViaThinkSoft
5
 * Copyright 2022 Daniel Marschall, ViaThinkSoft
6
 * Version 2022-09-12
6
 * Version 2022-09-18
7
 *
7
 *
8
 * Licensed under the Apache License, Version 2.0 (the "License");
8
 * Licensed under the Apache License, Version 2.0 (the "License");
9
 * you may not use this file except in compliance with the License.
9
 * you may not use this file except in compliance with the License.
10
 * You may obtain a copy of the License at
10
 * You may obtain a copy of the License at
11
 *
11
 *
Line 16... Line 16...
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
18
 * limitations under the License.
19
 */
19
 */
20
 
20
 
-
 
21
include_once __DIR__ . '/gmp_supplement.inc.php';
21
include_once __DIR__ . '/misc_functions.inc.php';
22
include_once __DIR__ . '/misc_functions.inc.php';
22
 
23
 
23
# ---
24
# ---
24
 
25
 
25
/*
26
/*
Line 80... Line 81...
80
                foreach ($by as $ii => $pb) {
81
                foreach ($by as $ii => $pb) {
81
 
82
 
82
                        $pb = hexdec($pb);
83
                        $pb = hexdec($pb);
83
 
84
 
84
                        if ($part == 2) { // First two arcs
85
                        if ($part == 2) { // First two arcs
85
                                $first = $pb / 40;
86
                                $first = floor($pb / 40);
86
                                $second = $pb % 40;
87
                                $second = $pb % 40;
87
                                if ($first > 2) {
88
                                if ($first > 2) {
88
                                        $first = 2;
89
                                        $first = 2;
89
                                        $output_oid[] = $first;
90
                                        $output_oid[] = $first;
90
                                        $arcBeginning = true;
91
                                        $arcBeginning = true;