fix one too small
[RRG-proxmark3.git] / client / src / iso4217.h
blob94c0c7db6b47fb463d6978a0f9a68e686ee54780
1 //-----------------------------------------------------------------------------
2 // Borrowed initially from
3 // https://github.com/L1L1/cardpeek/blob/master/dot_cardpeek_dir/scripts/lib/currency_codes.lua
4 //
5 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
6 //
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // See LICENSE.txt for the text of the license.
18 //-----------------------------------------------------------------------------
19 #ifndef ISO4217_H__
21 #define ISO4217_H__
22 #include <stddef.h>
24 typedef struct iso4217_s {
25 const char *code;
26 const char *desc;
27 int digits;
28 } iso4217_t;
30 const char *getCurrencyInfo(const char *cn_str);
32 // atr_t array is expected to be NULL terminated
33 const static iso4217_t Iso4217Table[] = {
34 {"008", "Lek", 2},
35 {"012", "Algerian Dinar", 2},
36 {"032", "Argentine Peso", 2},
37 {"036", "Australian Dollar", 2},
38 {"044", "Bahamian Dollar", 2},
39 {"048", "Bahraini Dinar", 3},
40 {"050", "Taka", 2},
41 {"051", "Armenian Dram", 2},
42 {"052", "Barbados Dollar", 2},
43 {"060", "Bermudian Dollar", 2},
44 {"064", "Ngultrum", 2},
45 {"068", "Boliviano", 2},
46 {"072", "Pula", 2},
47 {"084", "Belize Dollar", 2},
48 {"090", "Solomon Islands Dollar", 2},
49 {"096", "Brunei Dollar", 2},
50 {"104", "Kyat", 2},
51 {"108", "Burundi Franc", 0},
52 {"116", "Riel", 2},
53 {"124", "Canadian Dollar", 2},
54 {"132", "Cabo Verde Escudo", 2},
55 {"136", "Cayman Islands Dollar", 2},
56 {"144", "Sri Lanka Rupee", 2},
57 {"152", "Chilean Peso", 0},
58 {"156", "Yuan Renminbi", 2},
59 {"170", "Colombian Peso", 2},
60 {"174", "Comoro Franc", 0},
61 {"188", "Costa Rican Colon", 2},
62 {"191", "Croatian Kuna", 2},
63 {"192", "Cuban Peso", 2},
64 {"203", "Czech Koruna", 2},
65 {"208", "Danish Krone", 2},
66 {"214", "Dominican Peso", 2},
67 {"222", "El Salvador Colon", 2},
68 {"230", "Ethiopian Birr", 2},
69 {"232", "Nakfa", 2},
70 {"233", "Kroon", 2},
71 {"238", "Falkland Islands Pound", 2},
72 {"242", "Fiji Dollar", 2},
73 {"262", "Djibouti Franc", 0},
74 {"270", "Dalasi", 2},
75 {"292", "Gibraltar Pound", 2},
76 {"320", "Quetzal", 2},
77 {"324", "Guinea Franc", 0},
78 {"328", "Guyana Dollar", 2},
79 {"332", "Gourde", 2},
80 {"340", "Lempira", 2},
81 {"344", "Hong Kong Dollar", 2},
82 {"348", "Forint", 2},
83 {"352", "Iceland Krona", 0},
84 {"356", "Indian Rupee", 2},
85 {"360", "Rupiah", 2},
86 {"364", "Iranian Rial", 2},
87 {"368", "Iraqi Dinar", 3},
88 {"376", "New Israeli Sheqel", 2},
89 {"388", "Jamaican Dollar", 2},
90 {"392", "Yen", 0},
91 {"398", "Tenge", 2},
92 {"400", "Jordanian Dinar", 3},
93 {"404", "Kenyan Shilling", 2},
94 {"408", "North Korean Won", 2},
95 {"410", "Won", 0},
96 {"414", "Kuwaiti Dinar", 3},
97 {"417", "Som", 2},
98 {"418", "Kip", 2},
99 {"422", "Lebanese Pound", 2},
100 {"426", "Loti", 2},
101 {"428", "Latvian Lats", 2},
102 {"430", "Liberian Dollar", 2},
103 {"434", "Libyan Dinar", 3},
104 {"440", "Lithuanian Litas", 2},
105 {"446", "Pataca", 2},
106 {"454", "Kwacha", 2},
107 {"458", "Malaysian Ringgit", 2},
108 {"462", "Rufiyaa", 2},
109 {"478", "Ouguiya", 2},
110 {"480", "Mauritius Rupee", 2},
111 {"484", "Mexican Peso", 2},
112 {"496", "Tugrik", 2},
113 {"498", "Moldovan Leu", 2},
114 {"504", "Moroccan Dirham", 2},
115 {"512", "Rial Omani", 3},
116 {"516", "Namibia Dollar", 2},
117 {"524", "Nepalese Rupee", 2},
118 {"532", "Netherlands Antillean Guilder", 2},
119 {"533", "Aruban Florin", 2},
120 {"548", "Vatu", 0},
121 {"554", "New Zealand Dollar", 2},
122 {"558", "Cordoba Oro", 2},
123 {"566", "Naira", 2},
124 {"578", "Norwegian Krone", 2},
125 {"586", "Pakistan Rupee", 2},
126 {"590", "Balboa", 2},
127 {"598", "Kina", 2},
128 {"600", "Guarani", 0},
129 {"604", "Nuevo Sol", 2},
130 {"608", "Philippine Peso", 2},
131 {"624", "Guinea-Bissau Peso", -1},
132 {"634", "Qatari Rial", 2},
133 {"643", "Russian Ruble", 2},
134 {"646", "Rwanda Franc", 0},
135 {"654", "Saint Helena Pound", 2},
136 {"678", "Dobra", 2},
137 {"682", "Saudi Riyal", 2},
138 {"690", "Seychelles Rupee", 2},
139 {"694", "Leone", 2},
140 {"702", "Singapore Dollar", 2},
141 {"704", "Dong", 0},
142 {"706", "Somali Shilling", 2},
143 {"710", "Rand", 2},
144 {"728", "South Sudanese Pound", 2},
145 {"748", "Lilangeni", 2},
146 {"752", "Swedish Krona", 2},
147 {"756", "Swiss Franc", 2},
148 {"760", "Syrian Pound", 2},
149 {"764", "Baht", 2},
150 {"776", "Pa\'anga", 2},
151 {"780", "Trinidad and Tobago Dollar", 2},
152 {"784", "UAE Dirham", 2},
153 {"788", "Tunisian Dinar", 3},
154 {"800", "Uganda Shilling", 0},
155 {"807", "Denar", 2},
156 {"818", "Egyptian Pound", 2},
157 {"826", "Pound Sterling", 2},
158 {"834", "Tanzanian Shilling", 2},
159 {"840", "US Dollar", 2},
160 {"858", "Peso Uruguayo", 2},
161 {"860", "Uzbekistan Sum", 2},
162 {"882", "Tala", 2},
163 {"886", "Yemeni Rial", 2},
164 {"894", "Zambian Kwacha", 2},
165 {"901", "New Taiwan Dollar", 2},
166 {"931", "Peso Convertible", 2},
167 {"932", "Zimbabwe Dollar", 2},
168 {"934", "Turkmenistan New Manat", 2},
169 {"936", "Ghana Cedi", 2},
170 {"937", "Bolivar", 2},
171 {"938", "Sudanese Pound", 2},
172 {"940", "Uruguay Peso en Unidades Indexadas (URUIURUI)", 0},
173 {"941", "Serbian Dinar", 2},
174 {"943", "Mozambique Metical", 2},
175 {"944", "Azerbaijanian Manat", 2},
176 {"946", "New Romanian Leu", 2},
177 {"947", "WIR Euro", 2},
178 {"948", "WIR Franc", 2},
179 {"949", "Turkish Lira", 2},
180 {"950", "CFA Franc BEAC", 0},
181 {"951", "East Caribbean Dollar", 2},
182 {"952", "CFA Franc BCEAO", 0},
183 {"953", "CFP Franc", 0},
184 {"955", "Bond Markets Unit European Composite Unit (EURCO)", 0},
185 {"956", "Bond Markets Unit European Monetary Unit (E.M.U.-6)", 0},
186 {"957", "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)", 0},
187 {"958", "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)", 0},
188 {"959", "Gold", 0},
189 {"960", "SDR (Special Drawing Right)", 0},
190 {"961", "Silver", 0},
191 {"962", "Platinum", 0},
192 {"963", "Codes specifically reserved for testing purposes", -1},
193 {"964", "Palladium", -1},
194 {"965", "ADB Unit of Account", -1},
195 {"967", "Zambian Kwacha", 2},
196 {"968", "Surinam Dollar", 2},
197 {"969", "Malagasy Ariary", 1},
198 {"969", "Malagasy Ariary", 2},
199 {"970", "Unidad de Valor Real", 2},
200 {"971", "Afghani", 2},
201 {"972", "Somoni", 2},
202 {"973", "Kwanza", 2},
203 {"974", "Belarussian Ruble", 0},
204 {"975", "Bulgarian Lev", 2},
205 {"976", "Congolese Franc", 2},
206 {"977", "Convertible Mark", 2},
207 {"978", "Euro", 2},
208 {"979", "Mexican Unidad de Inversion (UDI)", 2},
209 {"980", "Hryvnia", 2},
210 {"981", "Lari", 2},
211 {"984", "Mvdol", 2},
212 {"985", "Zloty", 2},
213 {"986", "Brazilian Real", 2},
214 {"990", "Unidad de Fomento", 4},
215 {"994", "Sucre", -1},
216 {"997", "US Dollar (Next day)", 2},
217 {"998", "US Dollar (Same day)", 2},
218 {"999", "No currency is involved", -1},
219 {"NULL", "n/a", -1}
222 #endif