@trustchex/react-native-sdk 1.163.8 → 1.164.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/Shared/EIDReader/constants/eidConstants.js +65 -0
- package/lib/module/Shared/EIDReader/data/country.js +21 -44
- package/lib/module/Shared/EIDReader/data/countryInterface.js +1 -0
- package/lib/module/Shared/EIDReader/data/countryRegistry.js +65 -0
- package/lib/module/Shared/EIDReader/data/isoCountry.js +5 -1
- package/lib/module/Shared/EIDReader/data/unicodeCountry.js +5 -1
- package/lib/module/Shared/EIDReader/defaultFileSystem.js +4 -4
- package/lib/module/Shared/EIDReader/eidService.js +52 -51
- package/lib/module/Shared/EIDReader/lds/cvcaFile.js +2 -2
- package/lib/module/Shared/EIDReader/tlv/tlvCore.js +161 -0
- package/lib/module/Shared/EIDReader/tlv/tlvOutputState.js +4 -4
- package/lib/module/Shared/EIDReader/tlv/tlvOutputStream.js +8 -6
- package/lib/typescript/src/Shared/EIDReader/constants/eidConstants.d.ts +58 -0
- package/lib/typescript/src/Shared/EIDReader/constants/eidConstants.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/data/country.d.ts +4 -5
- package/lib/typescript/src/Shared/EIDReader/data/country.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/data/countryInterface.d.ts +21 -0
- package/lib/typescript/src/Shared/EIDReader/data/countryInterface.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/data/countryRegistry.d.ts +14 -0
- package/lib/typescript/src/Shared/EIDReader/data/countryRegistry.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/data/isoCountry.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/data/unicodeCountry.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/eidService.d.ts.map +1 -1
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvCore.d.ts +22 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvCore.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvOutputStream.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Shared/EIDReader/constants/eidConstants.ts +67 -0
- package/src/Shared/EIDReader/data/country.ts +16 -47
- package/src/Shared/EIDReader/data/countryInterface.ts +21 -0
- package/src/Shared/EIDReader/data/countryRegistry.ts +73 -0
- package/src/Shared/EIDReader/data/isoCountry.ts +4 -0
- package/src/Shared/EIDReader/data/unicodeCountry.ts +4 -0
- package/src/Shared/EIDReader/defaultFileSystem.ts +4 -4
- package/src/Shared/EIDReader/eidService.ts +58 -53
- package/src/Shared/EIDReader/lds/cvcaFile.ts +2 -2
- package/src/Shared/EIDReader/tlv/tlvCore.ts +170 -0
- package/src/Shared/EIDReader/tlv/tlvOutputState.ts +4 -4
- package/src/Shared/EIDReader/tlv/tlvOutputStream.ts +10 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import TLVUtil from "./tlv.utils.js";
|
|
4
4
|
export class TLVOutputState {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.state = [];
|
|
@@ -56,7 +56,7 @@ export class TLVOutputState {
|
|
|
56
56
|
const obj = new TLVStruct(tag);
|
|
57
57
|
if (this.state.length !== 0) {
|
|
58
58
|
const parent = this.state[this.state.length - 1];
|
|
59
|
-
const tagBytes =
|
|
59
|
+
const tagBytes = TLVUtil.getTagAsBytes(tag);
|
|
60
60
|
parent.write(tagBytes, 0, tagBytes.length);
|
|
61
61
|
}
|
|
62
62
|
this.state.push(obj);
|
|
@@ -83,7 +83,7 @@ export class TLVOutputState {
|
|
|
83
83
|
const obj = this.state.pop();
|
|
84
84
|
if (this.state.length !== 0) {
|
|
85
85
|
const parent = this.state[this.state.length - 1];
|
|
86
|
-
const lengthBytes =
|
|
86
|
+
const lengthBytes = TLVUtil.getLengthAsBytes(length);
|
|
87
87
|
parent.write(lengthBytes, 0, lengthBytes.length);
|
|
88
88
|
}
|
|
89
89
|
if (obj) {
|
|
@@ -102,7 +102,7 @@ export class TLVOutputState {
|
|
|
102
102
|
currentObject.setLength(byteCount);
|
|
103
103
|
if (currentObject.getValueBytesProcessed() === currentObject.getLength()) {
|
|
104
104
|
this.state.pop();
|
|
105
|
-
const lengthBytes =
|
|
105
|
+
const lengthBytes = TLVUtil.getLengthAsBytes(byteCount);
|
|
106
106
|
const value = currentObject.getValue();
|
|
107
107
|
this.updateValueBytesProcessed(lengthBytes, 0, lengthBytes.length);
|
|
108
108
|
this.updateValueBytesProcessed(value, 0, value.length);
|
|
@@ -11,18 +11,20 @@ export class TLVOutputStream extends OutputStream {
|
|
|
11
11
|
this.state = new TLVOutputState();
|
|
12
12
|
}
|
|
13
13
|
writeTag(tag) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.outputStream.writeBytes(Uint8Array.from(tagAsBytes));
|
|
14
|
+
if (!this.state.getIsAtStartOfTag()) {
|
|
15
|
+
throw new Error('Cannot write tag, still need length');
|
|
17
16
|
}
|
|
17
|
+
const tagAsBytes = TLVUtil.getTagAsBytes(tag);
|
|
18
|
+
this.outputStream.writeBytes(Uint8Array.from(tagAsBytes));
|
|
18
19
|
this.state.setTagProcessed(tag);
|
|
19
20
|
}
|
|
20
21
|
writeLength(length) {
|
|
22
|
+
if (!this.state.getIsAtStartOfLength()) {
|
|
23
|
+
throw new Error('Cannot write length');
|
|
24
|
+
}
|
|
21
25
|
const lengthAsBytes = TLVUtil.getLengthAsBytes(length);
|
|
26
|
+
this.outputStream.writeBytes(Uint8Array.from(lengthAsBytes));
|
|
22
27
|
this.state.setLengthProcessed(length);
|
|
23
|
-
if (this.state.canBeWritten()) {
|
|
24
|
-
this.outputStream.writeBytes(Uint8Array.from(lengthAsBytes));
|
|
25
|
-
}
|
|
26
28
|
}
|
|
27
29
|
writeValue(value) {
|
|
28
30
|
if (value == null) {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants used throughout the EID Reader module.
|
|
3
|
+
* This file helps avoid circular dependencies by centralizing shared constants.
|
|
4
|
+
*/
|
|
5
|
+
export declare const EID_CONSTANTS: {
|
|
6
|
+
readonly EXTENDED_MAX_TRANSCEIVE_LENGTH: 65536;
|
|
7
|
+
readonly NORMAL_MAX_TRANSCEIVE_LENGTH: 256;
|
|
8
|
+
readonly DEFAULT_MAX_BLOCKSIZE: 223;
|
|
9
|
+
readonly EF_CARD_ACCESS: 284;
|
|
10
|
+
readonly EF_CARD_SECURITY: 285;
|
|
11
|
+
readonly EF_DG1: 257;
|
|
12
|
+
readonly EF_DG2: 258;
|
|
13
|
+
readonly EF_DG3: 259;
|
|
14
|
+
readonly EF_DG4: 260;
|
|
15
|
+
readonly EF_DG5: 261;
|
|
16
|
+
readonly EF_DG6: 262;
|
|
17
|
+
readonly EF_DG7: 263;
|
|
18
|
+
readonly EF_DG8: 264;
|
|
19
|
+
readonly EF_DG9: 265;
|
|
20
|
+
readonly EF_DG10: 266;
|
|
21
|
+
readonly EF_DG11: 267;
|
|
22
|
+
readonly EF_DG12: 268;
|
|
23
|
+
readonly EF_DG13: 269;
|
|
24
|
+
readonly EF_DG14: 270;
|
|
25
|
+
readonly EF_DG15: 271;
|
|
26
|
+
readonly EF_DG16: 272;
|
|
27
|
+
readonly EF_SOD: 285;
|
|
28
|
+
readonly EF_COM: 286;
|
|
29
|
+
readonly EF_CVCA: 284;
|
|
30
|
+
readonly SFI_CARD_ACCESS: 28;
|
|
31
|
+
readonly SFI_CARD_SECURITY: 29;
|
|
32
|
+
readonly SFI_DG1: 1;
|
|
33
|
+
readonly SFI_DG2: 2;
|
|
34
|
+
readonly SFI_DG3: 3;
|
|
35
|
+
readonly SFI_DG4: 4;
|
|
36
|
+
readonly SFI_DG5: 5;
|
|
37
|
+
readonly SFI_DG6: 6;
|
|
38
|
+
readonly SFI_DG7: 7;
|
|
39
|
+
readonly SFI_DG8: 8;
|
|
40
|
+
readonly SFI_DG9: 9;
|
|
41
|
+
readonly SFI_DG10: 10;
|
|
42
|
+
readonly SFI_DG11: 11;
|
|
43
|
+
readonly SFI_DG12: 12;
|
|
44
|
+
readonly SFI_DG13: 13;
|
|
45
|
+
readonly SFI_DG14: 14;
|
|
46
|
+
readonly SFI_DG15: 15;
|
|
47
|
+
readonly SFI_DG16: 16;
|
|
48
|
+
readonly SFI_COM: 30;
|
|
49
|
+
readonly SFI_SOD: 29;
|
|
50
|
+
readonly SFI_CVCA: 28;
|
|
51
|
+
readonly NO_PACE_KEY_REFERENCE: 0;
|
|
52
|
+
readonly MRZ_PACE_KEY_REFERENCE: 1;
|
|
53
|
+
readonly CAN_PACE_KEY_REFERENCE: 2;
|
|
54
|
+
readonly PIN_PACE_KEY_REFERENCE: 3;
|
|
55
|
+
readonly PUK_PACE_KEY_REFERENCE: 4;
|
|
56
|
+
readonly APPLET_AID: Uint8Array<ArrayBuffer>;
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=eidConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eidConstants.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/constants/eidConstants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DhB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { ICountry } from './countryInterface';
|
|
2
|
+
export declare abstract class Country implements ICountry {
|
|
3
3
|
abstract valueOf(): number;
|
|
4
4
|
abstract getName(): string;
|
|
5
5
|
abstract getNationality(): string;
|
|
@@ -7,8 +7,7 @@ export declare abstract class Country {
|
|
|
7
7
|
abstract toAlpha3Code(): string;
|
|
8
8
|
static getInstance(code: number | string): Country;
|
|
9
9
|
static values(): Country[];
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
private static isAssignable;
|
|
10
|
+
static fromAlpha2(alpha2Code: string): Country;
|
|
11
|
+
static fromAlpha3(alpha3Code: string): Country;
|
|
13
12
|
}
|
|
14
13
|
//# sourceMappingURL=country.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/data/country.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"country.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/data/country.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,8BAAsB,OAAQ,YAAW,QAAQ;aAC/B,OAAO,IAAI,MAAM;aACjB,OAAO,IAAI,MAAM;aACjB,cAAc,IAAI,MAAM;aACxB,YAAY,IAAI,MAAM;aACtB,YAAY,IAAI,MAAM;WAExB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO;WAqB3C,MAAM,IAAI,OAAO,EAAE;WAKnB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;WAKvC,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;CAItD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for country instances to avoid circular dependencies.
|
|
3
|
+
*/
|
|
4
|
+
export interface ICountry {
|
|
5
|
+
valueOf(): number;
|
|
6
|
+
getName(): string;
|
|
7
|
+
getNationality(): string;
|
|
8
|
+
toAlpha2Code(): string;
|
|
9
|
+
toAlpha3Code(): string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Interface for country classes with static methods.
|
|
13
|
+
*/
|
|
14
|
+
export interface CountryConstructor {
|
|
15
|
+
values?(): ICountry[];
|
|
16
|
+
fromAlpha2?(alpha2Code: string): ICountry | null;
|
|
17
|
+
fromAlpha3?(alpha3Code: string): ICountry | null;
|
|
18
|
+
fromNumericCode?(numericCode: number): ICountry | null;
|
|
19
|
+
new (...args: any[]): ICountry;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=countryInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countryInterface.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/data/countryInterface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,OAAO,IAAI,MAAM,CAAC;IAClB,OAAO,IAAI,MAAM,CAAC;IAClB,cAAc,IAAI,MAAM,CAAC;IACzB,YAAY,IAAI,MAAM,CAAC;IACvB,YAAY,IAAI,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;IACtB,UAAU,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACjD,UAAU,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACjD,eAAe,CAAC,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACvD,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAC;CAChC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ICountry, CountryConstructor } from './countryInterface';
|
|
2
|
+
/**
|
|
3
|
+
* Registry for country implementations to avoid circular dependencies.
|
|
4
|
+
*/
|
|
5
|
+
export declare class CountryRegistry {
|
|
6
|
+
private static countryTypes;
|
|
7
|
+
static register(countryType: CountryConstructor): void;
|
|
8
|
+
static getRegisteredTypes(): Array<CountryConstructor>;
|
|
9
|
+
static values(): ICountry[];
|
|
10
|
+
static fromAlpha2(alpha2Code: string): ICountry;
|
|
11
|
+
static fromAlpha3(alpha3Code: string): ICountry;
|
|
12
|
+
static fromNumericCode(numericCode: number): ICountry;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=countryRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countryRegistry.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/data/countryRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEvE;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,YAAY,CAAiC;WAE9C,QAAQ,CAAC,WAAW,EAAE,kBAAkB,GAAG,IAAI;WAM/C,kBAAkB,IAAI,KAAK,CAAC,kBAAkB,CAAC;WAI/C,MAAM,IAAI,QAAQ,EAAE;WAiBpB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ;WAcxC,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ;WAcxC,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ;CAS7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isoCountry.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/data/isoCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"isoCountry.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/data/isoCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,qBAAa,UAAW,SAAQ,OAAO;IACrC,OAAc,EAAE,aAA0D;IAC1E,OAAc,EAAE,aAMd;IACF,OAAc,EAAE,aAA2D;IAC3E,OAAc,EAAE,aAMd;IACF,OAAc,EAAE,aAA8D;IAC9E,OAAc,EAAE,aAAyD;IACzE,OAAc,EAAE,aAA0D;IAC1E,OAAc,EAAE,aAMd;IACF,OAAc,EAAE,aAAwD;IACxE,OAAc,EAAE,aAA8D;IAC9E,OAAc,EAAE,aAMd;IACF,OAA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,MAAM,EACZ,WAAW,EAAE,MAAM;IAUd,OAAO,IAAI,MAAM;IAIjB,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIxB,QAAQ,IAAI,MAAM;IAIlB,YAAY,IAAI,MAAM;IAItB,YAAY,IAAI,MAAM;CAG9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unicodeCountry.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/data/unicodeCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"unicodeCountry.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/data/unicodeCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,qBAAa,cAAe,SAAQ,OAAO;IACzC,OAAc,EAAE,iBAA8D;IAC9E,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAA6D;IAC7E,OAAc,EAAE,iBAA8D;IAC9E,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAA4D;IAC5E,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAA8D;IAC9E,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAA4D;IAC5E,OAAc,EAAE,iBAA6D;IAC7E,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAA6D;IAC7E,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAA8D;IAC9E,OAAc,EAAE,iBAMd;IACF,OAAc,EAAE,iBAA6D;IAC7E,OAAc,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G,mBAAmB;IAIhD,8BAA8B,CACnC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,GACnB,mBAAmB;IAUf,sBAAsB,IAAI,MAAM;IAQhC,eAAe,CAAC,QAAQ,EAAE,YAAY;IAItC,kBAAkB,CAAC,QAAQ,EAAE,YAAY;IAIzC,gBAAgB;IAIvB,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS;CAU/C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ASN1Constants } from './asn1Constants';
|
|
2
|
+
/**
|
|
3
|
+
* Core TLV utility functions that don't depend on TLVInputStream/TLVOutputStream
|
|
4
|
+
* to avoid circular dependencies.
|
|
5
|
+
*/
|
|
6
|
+
export declare class TLVCore extends ASN1Constants {
|
|
7
|
+
static readonly UNIVERSAL_CLASS = 0;
|
|
8
|
+
static readonly APPLICATION_CLASS = 1;
|
|
9
|
+
static readonly CONTEXT_SPECIFIC_CLASS = 2;
|
|
10
|
+
static readonly PRIVATE_CLASS = 3;
|
|
11
|
+
static isPrimitive(tag: number): boolean;
|
|
12
|
+
static getTagLength(tag: number): number;
|
|
13
|
+
static isValidTag(tag: number): boolean;
|
|
14
|
+
static getLengthLength(length: number): number;
|
|
15
|
+
static getTagAsBytes(tag: number): number[];
|
|
16
|
+
static getLengthAsBytes(length: number): number[];
|
|
17
|
+
static getTagClass(tag: number): number;
|
|
18
|
+
private static log;
|
|
19
|
+
static writeTagLength(tag: number, length: number): Uint8Array;
|
|
20
|
+
}
|
|
21
|
+
export default TLVCore;
|
|
22
|
+
//# sourceMappingURL=tlvCore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tlvCore.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/tlv/tlvCore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,aAAa;IAExC,gBAAuB,eAAe,KAAK;IAC3C,gBAAuB,iBAAiB,KAAK;IAC7C,gBAAuB,sBAAsB,KAAK;IAClD,gBAAuB,aAAa,KAAK;WAE3B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;WAYjC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;WAgBjC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;WAIhC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;WAgBvC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;WA4BpC,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE;WAgB1C,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAsB9C,OAAO,CAAC,MAAM,CAAC,GAAG;WASJ,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU;CA+BtE;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tlvOutputStream.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/tlv/tlvOutputStream.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,OAAO,CAAC,YAAY,CAAmB;IACvC,OAAO,CAAC,KAAK,CAAiB;gBAElB,YAAY,EAAE,YAAY;
|
|
1
|
+
{"version":3,"file":"tlvOutputStream.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/EIDReader/tlv/tlvOutputStream.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,OAAO,CAAC,YAAY,CAAmB;IACvC,OAAO,CAAC,KAAK,CAAiB;gBAElB,YAAY,EAAE,YAAY;IAS/B,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAS3B,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IASxC,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAkBnC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAItB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAInC,oBAAoB,CAClB,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,IAAI;IAiBP,aAAa,IAAI,IAAI;IAkBrB,KAAK,IAAI,IAAI;IAIb,KAAK,IAAI,IAAI;CAOd"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants used throughout the EID Reader module.
|
|
3
|
+
* This file helps avoid circular dependencies by centralizing shared constants.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const EID_CONSTANTS = {
|
|
7
|
+
// Transceive lengths
|
|
8
|
+
EXTENDED_MAX_TRANSCEIVE_LENGTH: 65536,
|
|
9
|
+
NORMAL_MAX_TRANSCEIVE_LENGTH: 256,
|
|
10
|
+
DEFAULT_MAX_BLOCKSIZE: 223,
|
|
11
|
+
|
|
12
|
+
// File identifiers
|
|
13
|
+
EF_CARD_ACCESS: 0x011c,
|
|
14
|
+
EF_CARD_SECURITY: 0x011d,
|
|
15
|
+
EF_DG1: 0x0101,
|
|
16
|
+
EF_DG2: 0x0102,
|
|
17
|
+
EF_DG3: 0x0103,
|
|
18
|
+
EF_DG4: 0x0104,
|
|
19
|
+
EF_DG5: 0x0105,
|
|
20
|
+
EF_DG6: 0x0106,
|
|
21
|
+
EF_DG7: 0x0107,
|
|
22
|
+
EF_DG8: 0x0108,
|
|
23
|
+
EF_DG9: 0x0109,
|
|
24
|
+
EF_DG10: 0x010a,
|
|
25
|
+
EF_DG11: 0x010b,
|
|
26
|
+
EF_DG12: 0x010c,
|
|
27
|
+
EF_DG13: 0x010d,
|
|
28
|
+
EF_DG14: 0x010e,
|
|
29
|
+
EF_DG15: 0x010f,
|
|
30
|
+
EF_DG16: 0x0110,
|
|
31
|
+
EF_SOD: 0x011d,
|
|
32
|
+
EF_COM: 0x011e,
|
|
33
|
+
EF_CVCA: 0x011c,
|
|
34
|
+
|
|
35
|
+
// Short file identifiers
|
|
36
|
+
SFI_CARD_ACCESS: 0x1c,
|
|
37
|
+
SFI_CARD_SECURITY: 0x1d,
|
|
38
|
+
SFI_DG1: 0x01,
|
|
39
|
+
SFI_DG2: 0x02,
|
|
40
|
+
SFI_DG3: 0x03,
|
|
41
|
+
SFI_DG4: 0x04,
|
|
42
|
+
SFI_DG5: 0x05,
|
|
43
|
+
SFI_DG6: 0x06,
|
|
44
|
+
SFI_DG7: 0x07,
|
|
45
|
+
SFI_DG8: 0x08,
|
|
46
|
+
SFI_DG9: 0x09,
|
|
47
|
+
SFI_DG10: 0x0a,
|
|
48
|
+
SFI_DG11: 0x0b,
|
|
49
|
+
SFI_DG12: 0x0c,
|
|
50
|
+
SFI_DG13: 0x0d,
|
|
51
|
+
SFI_DG14: 0x0e,
|
|
52
|
+
SFI_DG15: 0x0f,
|
|
53
|
+
SFI_DG16: 0x10,
|
|
54
|
+
SFI_COM: 0x1e,
|
|
55
|
+
SFI_SOD: 0x1d,
|
|
56
|
+
SFI_CVCA: 0x1c,
|
|
57
|
+
|
|
58
|
+
// PACE key references
|
|
59
|
+
NO_PACE_KEY_REFERENCE: 0x00,
|
|
60
|
+
MRZ_PACE_KEY_REFERENCE: 0x01,
|
|
61
|
+
CAN_PACE_KEY_REFERENCE: 0x02,
|
|
62
|
+
PIN_PACE_KEY_REFERENCE: 0x03,
|
|
63
|
+
PUK_PACE_KEY_REFERENCE: 0x04,
|
|
64
|
+
|
|
65
|
+
// Applet AID
|
|
66
|
+
APPLET_AID: new Uint8Array([0xa0, 0x00, 0x00, 0x02, 0x47, 0x10, 0x01]),
|
|
67
|
+
} as const;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UnicodeCountry } from './unicodeCountry';
|
|
3
|
-
|
|
4
|
-
export abstract class Country {
|
|
5
|
-
private static readonly SUB_CLASSES: any[] = [ISOCountry, UnicodeCountry];
|
|
1
|
+
import type { ICountry } from './countryInterface';
|
|
6
2
|
|
|
3
|
+
export abstract class Country implements ICountry {
|
|
7
4
|
public abstract valueOf(): number;
|
|
8
5
|
public abstract getName(): string;
|
|
9
6
|
public abstract getNationality(): string;
|
|
@@ -11,21 +8,18 @@ export abstract class Country {
|
|
|
11
8
|
public abstract toAlpha3Code(): string;
|
|
12
9
|
|
|
13
10
|
public static getInstance(code: number | string): Country {
|
|
11
|
+
// Note: This will be dynamically resolved at runtime
|
|
12
|
+
const { CountryRegistry } = require('./countryRegistry');
|
|
13
|
+
|
|
14
14
|
if (typeof code === 'number') {
|
|
15
|
-
|
|
16
|
-
for (const country of values) {
|
|
17
|
-
if (country.valueOf() === code) {
|
|
18
|
-
return country;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
throw new Error('Illegal country code ' + code.toString(16));
|
|
15
|
+
return CountryRegistry.fromNumericCode(code);
|
|
22
16
|
} else if (typeof code === 'string') {
|
|
23
17
|
code = code.trim();
|
|
24
18
|
switch (code.length) {
|
|
25
19
|
case 2:
|
|
26
|
-
return
|
|
20
|
+
return CountryRegistry.fromAlpha2(code);
|
|
27
21
|
case 3:
|
|
28
|
-
return
|
|
22
|
+
return CountryRegistry.fromAlpha3(code);
|
|
29
23
|
default:
|
|
30
24
|
throw new Error('Illegal country code ' + code);
|
|
31
25
|
}
|
|
@@ -35,42 +29,17 @@ export abstract class Country {
|
|
|
35
29
|
}
|
|
36
30
|
|
|
37
31
|
public static values(): Country[] {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
if (Country.isAssignable(subClass)) {
|
|
41
|
-
try {
|
|
42
|
-
const method = subClass.values;
|
|
43
|
-
const subClassValues = method.call(null);
|
|
44
|
-
result.push(...subClassValues);
|
|
45
|
-
} catch (e) {
|
|
46
|
-
console.debug(`Exception: ${e}`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return result;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
private static fromAlpha2(code: string): Country {
|
|
54
|
-
const values = Country.values();
|
|
55
|
-
for (const country of values) {
|
|
56
|
-
if (country.toAlpha2Code() === code) {
|
|
57
|
-
return country;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
throw new Error('Unknown country code ' + code);
|
|
32
|
+
const { CountryRegistry } = require('./countryRegistry');
|
|
33
|
+
return CountryRegistry.values();
|
|
61
34
|
}
|
|
62
35
|
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
if (country.toAlpha3Code() === code) {
|
|
67
|
-
return country;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
throw new Error('Unknown country code ' + code);
|
|
36
|
+
public static fromAlpha2(alpha2Code: string): Country {
|
|
37
|
+
const { CountryRegistry } = require('./countryRegistry');
|
|
38
|
+
return CountryRegistry.fromAlpha2(alpha2Code);
|
|
71
39
|
}
|
|
72
40
|
|
|
73
|
-
|
|
74
|
-
|
|
41
|
+
public static fromAlpha3(alpha3Code: string): Country {
|
|
42
|
+
const { CountryRegistry } = require('./countryRegistry');
|
|
43
|
+
return CountryRegistry.fromAlpha3(alpha3Code);
|
|
75
44
|
}
|
|
76
45
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for country instances to avoid circular dependencies.
|
|
3
|
+
*/
|
|
4
|
+
export interface ICountry {
|
|
5
|
+
valueOf(): number;
|
|
6
|
+
getName(): string;
|
|
7
|
+
getNationality(): string;
|
|
8
|
+
toAlpha2Code(): string;
|
|
9
|
+
toAlpha3Code(): string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Interface for country classes with static methods.
|
|
14
|
+
*/
|
|
15
|
+
export interface CountryConstructor {
|
|
16
|
+
values?(): ICountry[];
|
|
17
|
+
fromAlpha2?(alpha2Code: string): ICountry | null;
|
|
18
|
+
fromAlpha3?(alpha3Code: string): ICountry | null;
|
|
19
|
+
fromNumericCode?(numericCode: number): ICountry | null;
|
|
20
|
+
new (...args: any[]): ICountry;
|
|
21
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ICountry, CountryConstructor } from './countryInterface';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Registry for country implementations to avoid circular dependencies.
|
|
5
|
+
*/
|
|
6
|
+
export class CountryRegistry {
|
|
7
|
+
private static countryTypes: Array<CountryConstructor> = [];
|
|
8
|
+
|
|
9
|
+
public static register(countryType: CountryConstructor): void {
|
|
10
|
+
if (!CountryRegistry.countryTypes.includes(countryType)) {
|
|
11
|
+
CountryRegistry.countryTypes.push(countryType);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public static getRegisteredTypes(): Array<CountryConstructor> {
|
|
16
|
+
return [...CountryRegistry.countryTypes];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public static values(): ICountry[] {
|
|
20
|
+
const result: ICountry[] = [];
|
|
21
|
+
for (const countryType of CountryRegistry.countryTypes) {
|
|
22
|
+
try {
|
|
23
|
+
const values = countryType.values?.();
|
|
24
|
+
if (Array.isArray(values)) {
|
|
25
|
+
result.push(...values);
|
|
26
|
+
}
|
|
27
|
+
} catch (e) {
|
|
28
|
+
console.debug(
|
|
29
|
+
`Exception getting values from ${countryType.name}: ${e}`
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public static fromAlpha2(alpha2Code: string): ICountry {
|
|
37
|
+
for (const countryType of CountryRegistry.countryTypes) {
|
|
38
|
+
try {
|
|
39
|
+
const country = countryType.fromAlpha2?.(alpha2Code);
|
|
40
|
+
if (country) {
|
|
41
|
+
return country;
|
|
42
|
+
}
|
|
43
|
+
} catch (e) {
|
|
44
|
+
// Continue to next type
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
throw new Error(`Unknown country code: ${alpha2Code}`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public static fromAlpha3(alpha3Code: string): ICountry {
|
|
51
|
+
for (const countryType of CountryRegistry.countryTypes) {
|
|
52
|
+
try {
|
|
53
|
+
const country = countryType.fromAlpha3?.(alpha3Code);
|
|
54
|
+
if (country) {
|
|
55
|
+
return country;
|
|
56
|
+
}
|
|
57
|
+
} catch (e) {
|
|
58
|
+
// Continue to next type
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
throw new Error(`Unknown country code: ${alpha3Code}`);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public static fromNumericCode(numericCode: number): ICountry {
|
|
65
|
+
const values = CountryRegistry.values();
|
|
66
|
+
for (const country of values) {
|
|
67
|
+
if (country.valueOf() === numericCode) {
|
|
68
|
+
return country;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
throw new Error(`Unknown country code: ${numericCode.toString(16)}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Country } from './country';
|
|
2
|
+
import { CountryRegistry } from './countryRegistry';
|
|
2
3
|
|
|
3
4
|
export class ISOCountry extends Country {
|
|
4
5
|
public static AD = new ISOCountry(32, 'AD', 'AND', 'Andorra', 'Andorran');
|
|
@@ -1249,3 +1250,6 @@ export class ISOCountry extends Country {
|
|
|
1249
1250
|
return this.alpha3Code;
|
|
1250
1251
|
}
|
|
1251
1252
|
}
|
|
1253
|
+
|
|
1254
|
+
// Register this country type with the registry
|
|
1255
|
+
CountryRegistry.register(ISOCountry);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Country } from './country';
|
|
2
|
+
import { CountryRegistry } from './countryRegistry';
|
|
2
3
|
|
|
3
4
|
export class UnicodeCountry extends Country {
|
|
4
5
|
public static AD = new UnicodeCountry(32, 'AD', 'AND', 'Andorra', 'Andorran');
|
|
@@ -1514,3 +1515,6 @@ export class UnicodeCountry extends Country {
|
|
|
1514
1515
|
return this.alpha3Code;
|
|
1515
1516
|
}
|
|
1516
1517
|
}
|
|
1518
|
+
|
|
1519
|
+
// Register this country type with the registry
|
|
1520
|
+
CountryRegistry.register(UnicodeCountry);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EID_CONSTANTS } from './constants/eidConstants';
|
|
2
2
|
import type { APDULevelReadBinaryCapable } from './apduLevelReadBinaryCapable';
|
|
3
3
|
import { ByteArrayInputStream } from './java/byteArrayInputStream';
|
|
4
4
|
import { DefaultFileInfo } from './defaultFileInfo';
|
|
@@ -37,7 +37,7 @@ export class DefaultFileSystem implements FileSystemStructured {
|
|
|
37
37
|
this.isSelected = false;
|
|
38
38
|
this.isSFIEnabled = isSFIEnabled;
|
|
39
39
|
this.fidToSFI = fidToSFI;
|
|
40
|
-
this.maxReadBinaryLength =
|
|
40
|
+
this.maxReadBinaryLength = EID_CONSTANTS.EXTENDED_MAX_TRANSCEIVE_LENGTH;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
public setWrapper(wrapper: APDUWrapper): void {
|
|
@@ -134,10 +134,10 @@ export class DefaultFileSystem implements FileSystemStructured {
|
|
|
134
134
|
const sw = (error as any).getSW();
|
|
135
135
|
if (
|
|
136
136
|
(sw & ISO7816_SW.WRONG_LENGTH) === ISO7816_SW.WRONG_LENGTH &&
|
|
137
|
-
this.maxReadBinaryLength >
|
|
137
|
+
this.maxReadBinaryLength > EID_CONSTANTS.DEFAULT_MAX_BLOCKSIZE
|
|
138
138
|
) {
|
|
139
139
|
this.wrapper = this.oldWrapper;
|
|
140
|
-
this.maxReadBinaryLength =
|
|
140
|
+
this.maxReadBinaryLength = EID_CONSTANTS.DEFAULT_MAX_BLOCKSIZE;
|
|
141
141
|
return new Uint8Array(0);
|
|
142
142
|
}
|
|
143
143
|
|