open-l2encdec 0.0.18 → 0.0.20

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/README.md CHANGED
@@ -12,8 +12,6 @@ $ pnpm add open-l2encdec
12
12
 
13
13
  ## Usage
14
14
 
15
- ### TypeScript / ES Modules
16
-
17
15
  ```typescript
18
16
  // node
19
17
  import { initL2EncDec, encode, decode, initParams } from 'open-l2encdec';
package/dist/index.web.js CHANGED
@@ -3,7 +3,7 @@ async function loadModule() {
3
3
  if (cachedModule)
4
4
  return cachedModule;
5
5
  // @ts-ignore - generated file
6
- const mod = await import("./l2encdec.web.js");
6
+ const mod = await import("./l2encdec.browser.js");
7
7
  cachedModule = (await mod.default());
8
8
  return cachedModule;
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.js","sourceRoot":"","sources":["../index.web.ts"],"names":[],"mappings":"AAgBA,IAAI,YAAoC,CAAC;AAEzC,KAAK,UAAU,UAAU;IACvB,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IAEtC,8BAA8B;IAC9B,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAC9C,YAAY,GAAG,CAAC,MAAM,GAAG,CAAC,OAAO,EAAE,CAAe,CAAC;IACnD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,KAA4B,EAC5B,MAAc,EACd,MAAmB;IAEnB,MAAM,CAAC,GAAG,MAAM,IAAI,MAAM,UAAU,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvC,OAAO,MAAM,YAAY,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC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M,IAAI,MAAM,UAAU,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvC,OAAO,MAAM,YAAY,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,KAA4B,EAC5B,MAAc,EACd,MAAmB;IAEnB,MAAM,CAAC,GAAG,MAAM,IAAI,MAAM,UAAU,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvC,OAAO,MAAM,YAAY,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,QAAgB,EAChB,QAAiB,EACjB,sBAAgC,EAChC,MAAmB;IAEnB,MAAM,CAAC,GAAG,MAAM,IAAI,MAAM,UAAU,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9B,CAAC,CAAC,WAAW,CACX,MAAM,EACN,QAAQ,EACR,QAAQ,IAAI,EAAE,EACd,sBAAsB,IAAI,KAAK,CAChC,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC"}
Binary file
@@ -27,6 +27,11 @@ export interface DecodeResultValue<T extends number> {
27
27
  }
28
28
  export type DecodeResult = DecodeResultValue<0>|DecodeResultValue<-1>|DecodeResultValue<-2>|DecodeResultValue<-3>;
29
29
 
30
+ export interface ChecksumResultValue<T extends number> {
31
+ value: T;
32
+ }
33
+ export type ChecksumResult = ChecksumResultValue<0>|ChecksumResultValue<-1>;
34
+
30
35
  export interface Params extends ClassHandle {
31
36
  type: Type;
32
37
  protocol: number;
@@ -54,10 +59,12 @@ interface EmbindModule {
54
59
  Type: {NONE: TypeValue<0>, XOR: TypeValue<1>, XOR_FILENAME: TypeValue<2>, XOR_POSITION: TypeValue<3>, BLOWFISH: TypeValue<4>, RSA: TypeValue<5>};
55
60
  EncodeResult: {SUCCESS: EncodeResultValue<0>, INVALID_TYPE: EncodeResultValue<-1>, COMPRESSION_FAILED: EncodeResultValue<-2>, ENCRYPTION_FAILED: EncodeResultValue<-3>};
56
61
  DecodeResult: {SUCCESS: DecodeResultValue<0>, INVALID_TYPE: DecodeResultValue<-1>, DECOMPRESSION_FAILED: DecodeResultValue<-2>, DECRYPTION_FAILED: DecodeResultValue<-3>};
62
+ ChecksumResult: {SUCCESS: ChecksumResultValue<0>, MISMATCH: ChecksumResultValue<-1>};
57
63
  Params: {
58
64
  new(): Params;
59
65
  };
60
- init_params(_0: Params, _1: number, _2: EmbindString, _3: boolean): boolean;
66
+ init_params(_0: Params, _1: number, _2: EmbindString, _3: boolean): void;
67
+ verify_checksum(_0: any): void;
61
68
  encode(_0: any, _1: Params): any;
62
69
  decode(_0: any, _1: Params): any;
63
70
  }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-l2encdec",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "TypeScript/JavaScript bindings for open-l2encdec - Lineage 2 encryption library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",