blob: c56478b77c9d8e232085bb7fc64a6da30b725f65 [file] [log] [blame]
Kévin Redon9a12d682018-07-08 13:21:16 +02001/* ISO7816-3 Fi/Di tables + computation
2 *
3 * (C) 2010-2015 by Harald Welte <laforge@gnumonks.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
18 */
Harald Welte30a53f82015-11-08 14:29:55 +010019#pragma once
20
21#include <stdint.h>
22
Kévin Redon74063372018-07-03 15:57:03 +020023/* Table 7 of ISO 7816-3:2006 */
24extern const uint16_t fi_table[];
25
26/* Table 8 from ISO 7816-3:2006 */
27extern const uint8_t di_table[];
28
Harald Welte30a53f82015-11-08 14:29:55 +010029/* compute the F/D ratio based on Fi and Di values */
30int compute_fidi_ratio(uint8_t fi, uint8_t di);