@edirect/encrypt-modules 10.0.0 → 10.1.0

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.
Files changed (64) hide show
  1. package/{src/aes-encrypt/aes-encrypt.interface.ts → dist/aes-encrypt/aes-encrypt.interface.d.ts} +5 -15
  2. package/dist/aes-encrypt/aes-encrypt.interface.js +3 -0
  3. package/dist/aes-encrypt/aes-encrypt.interface.js.map +1 -0
  4. package/dist/aes-encrypt/aes-encrypt.module.d.ts +2 -0
  5. package/dist/aes-encrypt/aes-encrypt.module.js +21 -0
  6. package/dist/aes-encrypt/aes-encrypt.module.js.map +1 -0
  7. package/dist/aes-encrypt/aes-encrypt.service.d.ts +7 -0
  8. package/dist/aes-encrypt/aes-encrypt.service.js +42 -0
  9. package/dist/aes-encrypt/aes-encrypt.service.js.map +1 -0
  10. package/dist/bin-pgp-encrypt/bin-pgp-encrypt.interface.d.ts +4 -0
  11. package/dist/bin-pgp-encrypt/bin-pgp-encrypt.interface.js +3 -0
  12. package/dist/bin-pgp-encrypt/bin-pgp-encrypt.interface.js.map +1 -0
  13. package/dist/bin-pgp-encrypt/bin-pgp-encrypt.module.d.ts +2 -0
  14. package/dist/bin-pgp-encrypt/bin-pgp-encrypt.module.js +21 -0
  15. package/dist/bin-pgp-encrypt/bin-pgp-encrypt.module.js.map +1 -0
  16. package/dist/bin-pgp-encrypt/bin-pgp-encrypt.service.d.ts +5 -0
  17. package/dist/bin-pgp-encrypt/bin-pgp-encrypt.service.js +69 -0
  18. package/dist/bin-pgp-encrypt/bin-pgp-encrypt.service.js.map +1 -0
  19. package/{src/index.ts → dist/index.d.ts} +2 -0
  20. package/dist/index.js +24 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/pgp-encrypt/pgp-encrypt.interface.d.ts +4 -0
  23. package/dist/pgp-encrypt/pgp-encrypt.interface.js +3 -0
  24. package/dist/pgp-encrypt/pgp-encrypt.interface.js.map +1 -0
  25. package/dist/pgp-encrypt/pgp-encrypt.module.d.ts +2 -0
  26. package/dist/pgp-encrypt/pgp-encrypt.module.js +21 -0
  27. package/dist/pgp-encrypt/pgp-encrypt.module.js.map +1 -0
  28. package/dist/pgp-encrypt/pgp-encrypt.service.d.ts +5 -0
  29. package/dist/pgp-encrypt/pgp-encrypt.service.js +73 -0
  30. package/dist/pgp-encrypt/pgp-encrypt.service.js.map +1 -0
  31. package/dist/rsa-encrypt/rsa-encrypt.interface.d.ts +6 -0
  32. package/dist/rsa-encrypt/rsa-encrypt.interface.js +3 -0
  33. package/dist/rsa-encrypt/rsa-encrypt.interface.js.map +1 -0
  34. package/dist/rsa-encrypt/rsa-encrypt.module.d.ts +2 -0
  35. package/dist/rsa-encrypt/rsa-encrypt.module.js +21 -0
  36. package/dist/rsa-encrypt/rsa-encrypt.module.js.map +1 -0
  37. package/dist/rsa-encrypt/rsa-encrypt.service.d.ts +7 -0
  38. package/dist/rsa-encrypt/rsa-encrypt.service.js +28 -0
  39. package/dist/rsa-encrypt/rsa-encrypt.service.js.map +1 -0
  40. package/dist/tsconfig.build.tsbuildinfo +1 -0
  41. package/{src/zip-encrypt/zipencrypt.interface.ts → dist/zip-encrypt/zipencrypt.interface.d.ts} +1 -4
  42. package/dist/zip-encrypt/zipencrypt.interface.js +3 -0
  43. package/dist/zip-encrypt/zipencrypt.interface.js.map +1 -0
  44. package/dist/zip-encrypt/zipencrypt.module.d.ts +2 -0
  45. package/dist/zip-encrypt/zipencrypt.module.js +21 -0
  46. package/dist/zip-encrypt/zipencrypt.module.js.map +1 -0
  47. package/dist/zip-encrypt/zipencrypt.service.d.ts +5 -0
  48. package/dist/zip-encrypt/zipencrypt.service.js +36 -0
  49. package/dist/zip-encrypt/zipencrypt.service.js.map +1 -0
  50. package/package.json +2 -1
  51. package/.prettierrc +0 -4
  52. package/nest-cli.json +0 -4
  53. package/src/aes-encrypt/aes-encrypt.module.ts +0 -8
  54. package/src/aes-encrypt/aes-encrypt.service.ts +0 -65
  55. package/src/pgp-encrypt/pgp-encrypt.interface.ts +0 -8
  56. package/src/pgp-encrypt/pgp-encrypt.module.ts +0 -8
  57. package/src/pgp-encrypt/pgp-encrypt.service.ts +0 -74
  58. package/src/rsa-encrypt/rsa-encrypt.interface.ts +0 -15
  59. package/src/rsa-encrypt/rsa-encrypt.module.ts +0 -8
  60. package/src/rsa-encrypt/rsa-encrypt.service.ts +0 -30
  61. package/src/zip-encrypt/zipencrypt.module.ts +0 -8
  62. package/src/zip-encrypt/zipencrypt.service.ts +0 -29
  63. package/tsconfig.build.json +0 -4
  64. package/tsconfig.json +0 -21
@@ -1,8 +1,8 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
1
3
  import { CipherKey, BinaryLike, CipherCCMTypes, Utf8AsciiBinaryEncoding, HexBase64BinaryEncoding } from 'crypto';
2
4
  import { TransformOptions } from 'stream';
3
-
4
5
  type encryptionMethods = CipherCCMTypes | 'aes-256-cbc';
5
-
6
6
  export interface IaesEncryptOptionalParameters {
7
7
  iv?: BinaryLike;
8
8
  encryptionMethod?: encryptionMethods;
@@ -10,7 +10,6 @@ export interface IaesEncryptOptionalParameters {
10
10
  outputEncoding?: HexBase64BinaryEncoding;
11
11
  options?: TransformOptions;
12
12
  }
13
-
14
13
  export interface IaesDecryptOptionalParameters {
15
14
  iv?: BinaryLike;
16
15
  encryptionMethod?: encryptionMethods;
@@ -18,17 +17,8 @@ export interface IaesDecryptOptionalParameters {
18
17
  outputEncoding?: Utf8AsciiBinaryEncoding;
19
18
  options?: TransformOptions;
20
19
  }
21
-
22
20
  export interface AesEncryptInterface {
23
- encrypt(
24
- message: string,
25
- passphrase: CipherKey,
26
- optionalParameters?: IaesEncryptOptionalParameters,
27
- ): string;
28
-
29
- decrypt(
30
- encryptedMessage: string,
31
- passphrase: BinaryLike,
32
- optionalParameters?: IaesDecryptOptionalParameters,
33
- ): string;
21
+ encrypt(message: string, passphrase: CipherKey, optionalParameters?: IaesEncryptOptionalParameters): string;
22
+ decrypt(encryptedMessage: string, passphrase: BinaryLike, optionalParameters?: IaesDecryptOptionalParameters): string;
34
23
  }
24
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=aes-encrypt.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-encrypt.interface.js","sourceRoot":"","sources":["../../src/aes-encrypt/aes-encrypt.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare class AesEncryptModule {
2
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AesEncryptModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const aes_encrypt_service_1 = require("./aes-encrypt.service");
12
+ let AesEncryptModule = class AesEncryptModule {
13
+ };
14
+ AesEncryptModule = __decorate([
15
+ (0, common_1.Module)({
16
+ providers: [aes_encrypt_service_1.AesEncryptService],
17
+ exports: [aes_encrypt_service_1.AesEncryptService],
18
+ })
19
+ ], AesEncryptModule);
20
+ exports.AesEncryptModule = AesEncryptModule;
21
+ //# sourceMappingURL=aes-encrypt.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-encrypt.module.js","sourceRoot":"","sources":["../../src/aes-encrypt/aes-encrypt.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+DAA0D;AAMnD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,gBAAgB;IAJ5B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,uCAAiB,CAAC;QAC9B,OAAO,EAAE,CAAC,uCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG;AAAnB,4CAAgB"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="node" />
2
+ import { CipherKey, BinaryLike } from 'crypto';
3
+ import { AesEncryptInterface, IaesDecryptOptionalParameters, IaesEncryptOptionalParameters } from './aes-encrypt.interface';
4
+ export declare class AesEncryptService implements AesEncryptInterface {
5
+ encrypt(message: string, passphrase: CipherKey, optionalParameters?: IaesEncryptOptionalParameters): string;
6
+ decrypt(encryptedMessage: string, passphrase: BinaryLike, optionalParameters?: IaesDecryptOptionalParameters): string;
7
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AesEncryptService = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const crypto_1 = require("crypto");
12
+ let AesEncryptService = class AesEncryptService {
13
+ encrypt(message, passphrase, optionalParameters = {}) {
14
+ optionalParameters = Object.assign({
15
+ iv: Buffer.alloc(16).fill(0),
16
+ encryptionMethod: 'aes-256-cbc',
17
+ inputEncoding: 'utf8',
18
+ outputEncoding: 'hex',
19
+ }, optionalParameters);
20
+ const cipher = (0, crypto_1.createCipheriv)(optionalParameters.encryptionMethod, passphrase, optionalParameters.iv, optionalParameters.options);
21
+ let result = cipher.update(message, optionalParameters.inputEncoding, optionalParameters.outputEncoding);
22
+ result += cipher.final(optionalParameters.outputEncoding);
23
+ return result;
24
+ }
25
+ decrypt(encryptedMessage, passphrase, optionalParameters = {}) {
26
+ optionalParameters = Object.assign({
27
+ encryptionMethod: 'aes-256-cbc',
28
+ iv: Buffer.alloc(16).fill(0),
29
+ inputEncoding: 'hex',
30
+ outputEncoding: 'utf8',
31
+ }, optionalParameters);
32
+ const decipher = (0, crypto_1.createDecipheriv)(optionalParameters.encryptionMethod, passphrase, optionalParameters.iv, optionalParameters.options);
33
+ let result = decipher.update(encryptedMessage, optionalParameters.inputEncoding, optionalParameters.outputEncoding);
34
+ result += decipher.final(optionalParameters.outputEncoding);
35
+ return result;
36
+ }
37
+ };
38
+ AesEncryptService = __decorate([
39
+ (0, common_1.Injectable)()
40
+ ], AesEncryptService);
41
+ exports.AesEncryptService = AesEncryptService;
42
+ //# sourceMappingURL=aes-encrypt.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-encrypt.service.js","sourceRoot":"","sources":["../../src/aes-encrypt/aes-encrypt.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,mCAOgB;AAOT,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAEnB,OAAO,CAAC,OAAe,EAAE,UAAqB,EAAE,qBAAoD,EAAE;QACzG,kBAAkB,iBACX;YACC,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5B,gBAAgB,EAAE,aAAa;YAC/B,aAAa,EAAE,MAAM;YACrB,cAAc,EAAE,KAAK;SACxB,EAAK,kBAAkB,CAC3B,CAAC;QACF,MAAM,MAAM,GAAW,IAAA,uBAAc,EACjC,kBAAkB,CAAC,gBAAgB,EACnC,UAAU,EACV,kBAAkB,CAAC,EAAE,EACrB,kBAAkB,CAAC,OAAO,CAC7B,CAAC;QACF,IAAI,MAAM,GAAW,MAAM,CAAC,MAAM,CAC9B,OAAO,EACP,kBAAkB,CAAC,aAAa,EAChC,kBAAkB,CAAC,cAAc,CACpC,CAAC;QACF,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;QAC1D,OAAO,MAAM,CAAC;IAClB,CAAC;IAEM,OAAO,CAAC,gBAAwB,EAAE,UAAsB,EAAE,qBAAoD,EAAE;QACnH,kBAAkB,iBACX;YACC,gBAAgB,EAAE,aAAa;YAC/B,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5B,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,MAAM;SACzB,EAAK,kBAAkB,CAC3B,CAAC;QACF,MAAM,QAAQ,GAAa,IAAA,yBAAgB,EACvC,kBAAkB,CAAC,gBAAgB,EACnC,UAAU,EACV,kBAAkB,CAAC,EAAE,EACrB,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAChC,IAAI,MAAM,GAAW,QAAQ,CAAC,MAAM,CAChC,gBAAgB,EAChB,kBAAkB,CAAC,aAAa,EAChC,kBAAkB,CAAC,cAAc,CACpC,CAAC;QACF,MAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;QAC5D,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ,CAAA;AAjDY,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAiD7B;AAjDY,8CAAiB"}
@@ -0,0 +1,4 @@
1
+ export interface IBinPgpEncryptModuleInterface {
2
+ encrypt(pgpKey: string, dataToEncrypt: any): Promise<string>;
3
+ decrypt(pgpKey: string, encryptedData: BinaryData, passphrase?: string): Promise<string>;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=bin-pgp-encrypt.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin-pgp-encrypt.interface.js","sourceRoot":"","sources":["../../src/bin-pgp-encrypt/bin-pgp-encrypt.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare class BinPgpEncryptModule {
2
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.BinPgpEncryptModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const bin_pgp_encrypt_service_1 = require("./bin-pgp-encrypt.service");
12
+ let BinPgpEncryptModule = class BinPgpEncryptModule {
13
+ };
14
+ BinPgpEncryptModule = __decorate([
15
+ (0, common_1.Module)({
16
+ providers: [bin_pgp_encrypt_service_1.BinPgpEncryptService],
17
+ exports: [bin_pgp_encrypt_service_1.BinPgpEncryptService],
18
+ })
19
+ ], BinPgpEncryptModule);
20
+ exports.BinPgpEncryptModule = BinPgpEncryptModule;
21
+ //# sourceMappingURL=bin-pgp-encrypt.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin-pgp-encrypt.module.js","sourceRoot":"","sources":["../../src/bin-pgp-encrypt/bin-pgp-encrypt.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uEAAiE;AAM1D,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,mBAAmB;IAJ/B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,8CAAoB,CAAC;QACjC,OAAO,EAAE,CAAC,8CAAoB,CAAC;KAChC,CAAC;GACW,mBAAmB,CAAG;AAAtB,kDAAmB"}
@@ -0,0 +1,5 @@
1
+ import { IBinPgpEncryptModuleInterface } from './bin-pgp-encrypt.interface';
2
+ export declare class BinPgpEncryptService implements IBinPgpEncryptModuleInterface {
3
+ encrypt(pgpKey: string, dataToEncrypt: any): Promise<string>;
4
+ decrypt(pgpKey: string, encryptedData: BinaryData, passphrase?: string): Promise<string>;
5
+ }
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.BinPgpEncryptService = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const openpgp = require("openpgp");
12
+ let BinPgpEncryptService = class BinPgpEncryptService {
13
+ async encrypt(pgpKey, dataToEncrypt) {
14
+ try {
15
+ const publicKey = await openpgp.readKey({
16
+ armoredKey: pgpKey,
17
+ });
18
+ const encrypted = await openpgp.encrypt({
19
+ message: await openpgp.createMessage({ text: dataToEncrypt }),
20
+ encryptionKeys: publicKey,
21
+ format: 'binary',
22
+ });
23
+ return encrypted.toString();
24
+ }
25
+ catch (error) {
26
+ throw new Error(`File encryption error: \n ${error}`);
27
+ }
28
+ }
29
+ async decrypt(pgpKey, encryptedData, passphrase) {
30
+ try {
31
+ const openpgpPrivatekey = await openpgp.readPrivateKey({
32
+ armoredKey: pgpKey,
33
+ });
34
+ const decryptKeyOptions = {
35
+ privateKey: openpgpPrivatekey,
36
+ config: {
37
+ allowInsecureDecryptionWithSigningKeys: true,
38
+ allowUnauthenticatedMessages: true,
39
+ },
40
+ };
41
+ let privateKey = openpgpPrivatekey;
42
+ if (!!passphrase) {
43
+ decryptKeyOptions.passphrase = passphrase;
44
+ privateKey = await openpgp.decryptKey(decryptKeyOptions);
45
+ }
46
+ const message = await openpgp.readMessage({
47
+ binaryMessage: encryptedData,
48
+ });
49
+ const { data: decryptedData } = await openpgp.decrypt({
50
+ message,
51
+ decryptionKeys: privateKey,
52
+ format: 'utf8',
53
+ config: {
54
+ allowInsecureDecryptionWithSigningKeys: true,
55
+ allowUnauthenticatedMessages: true,
56
+ },
57
+ });
58
+ return decryptedData.toString();
59
+ }
60
+ catch (error) {
61
+ throw new Error(`File decryption error: \n ${error}`);
62
+ }
63
+ }
64
+ };
65
+ BinPgpEncryptService = __decorate([
66
+ (0, common_1.Injectable)()
67
+ ], BinPgpEncryptService);
68
+ exports.BinPgpEncryptService = BinPgpEncryptService;
69
+ //# sourceMappingURL=bin-pgp-encrypt.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin-pgp-encrypt.service.js","sourceRoot":"","sources":["../../src/bin-pgp-encrypt/bin-pgp-encrypt.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,mCAAmC;AAI5B,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACxB,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,aAAkB;QACrD,IAAI;YACF,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC;gBACtC,UAAU,EAAE,MAAM;aACnB,CAAC,CAAC;YACH,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC;gBACtC,OAAO,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;gBAC7D,cAAc,EAAE,SAAS;gBACzB,MAAM,EAAE,QAAQ;aACjB,CAAC,CAAC;YACH,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;SAC7B;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,EAAE,CAAC,CAAC;SACvD;IACH,CAAC;IAEM,KAAK,CAAC,OAAO,CAClB,MAAc,EACd,aAAyB,EACzB,UAAmB;QAEnB,IAAI;YACF,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC;gBACrD,UAAU,EAAE,MAAM;aACnB,CAAC,CAAC;YAEH,MAAM,iBAAiB,GAInB;gBACF,UAAU,EAAE,iBAAiB;gBAC7B,MAAM,EAAE;oBACN,sCAAsC,EAAE,IAAI;oBAC5C,4BAA4B,EAAE,IAAI;iBACnC;aACF,CAAC;YAEF,IAAI,UAAU,GAAG,iBAAiB,CAAC;YAEnC,IAAI,CAAC,CAAC,UAAU,EAAE;gBAChB,iBAAiB,CAAC,UAAU,GAAG,UAAU,CAAC;gBAC1C,UAAU,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;aAC1D;YAED,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC;gBACxC,aAAa,EAAE,aAAa;aAC7B,CAAC,CAAC;YACH,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC;gBACpD,OAAO;gBACP,cAAc,EAAE,UAAU;gBAC1B,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE;oBACN,sCAAsC,EAAE,IAAI;oBAC5C,4BAA4B,EAAE,IAAI;iBACnC;aACF,CAAC,CAAC;YAEH,OAAO,aAAa,CAAC,QAAQ,EAAE,CAAC;SACjC;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,EAAE,CAAC,CAAC;SACvD;IACH,CAAC;CACF,CAAA;AAhEY,oBAAoB;IADhC,IAAA,mBAAU,GAAE;GACA,oBAAoB,CAgEhC;AAhEY,oDAAoB"}
@@ -4,5 +4,7 @@ export { RsaEncryptModule } from './rsa-encrypt/rsa-encrypt.module';
4
4
  export { RsaEncryptService } from './rsa-encrypt/rsa-encrypt.service';
5
5
  export { PgpEncryptModule } from './pgp-encrypt/pgp-encrypt.module';
6
6
  export { PgpEncryptService } from './pgp-encrypt/pgp-encrypt.service';
7
+ export { BinPgpEncryptModule } from './bin-pgp-encrypt/bin-pgp-encrypt.module';
8
+ export { BinPgpEncryptService } from './bin-pgp-encrypt/bin-pgp-encrypt.service';
7
9
  export { ZipEncryptModule } from './zip-encrypt/zipencrypt.module';
8
10
  export { ZipEncryptService } from './zip-encrypt/zipencrypt.service';
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZipEncryptService = exports.ZipEncryptModule = exports.BinPgpEncryptService = exports.BinPgpEncryptModule = exports.PgpEncryptService = exports.PgpEncryptModule = exports.RsaEncryptService = exports.RsaEncryptModule = exports.AesEncryptService = exports.AesEncryptModule = void 0;
4
+ var aes_encrypt_module_1 = require("./aes-encrypt/aes-encrypt.module");
5
+ Object.defineProperty(exports, "AesEncryptModule", { enumerable: true, get: function () { return aes_encrypt_module_1.AesEncryptModule; } });
6
+ var aes_encrypt_service_1 = require("./aes-encrypt/aes-encrypt.service");
7
+ Object.defineProperty(exports, "AesEncryptService", { enumerable: true, get: function () { return aes_encrypt_service_1.AesEncryptService; } });
8
+ var rsa_encrypt_module_1 = require("./rsa-encrypt/rsa-encrypt.module");
9
+ Object.defineProperty(exports, "RsaEncryptModule", { enumerable: true, get: function () { return rsa_encrypt_module_1.RsaEncryptModule; } });
10
+ var rsa_encrypt_service_1 = require("./rsa-encrypt/rsa-encrypt.service");
11
+ Object.defineProperty(exports, "RsaEncryptService", { enumerable: true, get: function () { return rsa_encrypt_service_1.RsaEncryptService; } });
12
+ var pgp_encrypt_module_1 = require("./pgp-encrypt/pgp-encrypt.module");
13
+ Object.defineProperty(exports, "PgpEncryptModule", { enumerable: true, get: function () { return pgp_encrypt_module_1.PgpEncryptModule; } });
14
+ var pgp_encrypt_service_1 = require("./pgp-encrypt/pgp-encrypt.service");
15
+ Object.defineProperty(exports, "PgpEncryptService", { enumerable: true, get: function () { return pgp_encrypt_service_1.PgpEncryptService; } });
16
+ var bin_pgp_encrypt_module_1 = require("./bin-pgp-encrypt/bin-pgp-encrypt.module");
17
+ Object.defineProperty(exports, "BinPgpEncryptModule", { enumerable: true, get: function () { return bin_pgp_encrypt_module_1.BinPgpEncryptModule; } });
18
+ var bin_pgp_encrypt_service_1 = require("./bin-pgp-encrypt/bin-pgp-encrypt.service");
19
+ Object.defineProperty(exports, "BinPgpEncryptService", { enumerable: true, get: function () { return bin_pgp_encrypt_service_1.BinPgpEncryptService; } });
20
+ var zipencrypt_module_1 = require("./zip-encrypt/zipencrypt.module");
21
+ Object.defineProperty(exports, "ZipEncryptModule", { enumerable: true, get: function () { return zipencrypt_module_1.ZipEncryptModule; } });
22
+ var zipencrypt_service_1 = require("./zip-encrypt/zipencrypt.service");
23
+ Object.defineProperty(exports, "ZipEncryptService", { enumerable: true, get: function () { return zipencrypt_service_1.ZipEncryptService; } });
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AAA3D,sHAAA,gBAAgB,OAAA;AACzB,yEAAsE;AAA7D,wHAAA,iBAAiB,OAAA;AAC1B,uEAAoE;AAA3D,sHAAA,gBAAgB,OAAA;AACzB,yEAAsE;AAA7D,wHAAA,iBAAiB,OAAA;AAC1B,uEAAoE;AAA3D,sHAAA,gBAAgB,OAAA;AACzB,yEAAsE;AAA7D,wHAAA,iBAAiB,OAAA;AAC1B,mFAA+E;AAAtE,6HAAA,mBAAmB,OAAA;AAC5B,qFAAiF;AAAxE,+HAAA,oBAAoB,OAAA;AAC7B,qEAAmE;AAA1D,qHAAA,gBAAgB,OAAA;AACzB,uEAAqE;AAA5D,uHAAA,iBAAiB,OAAA"}
@@ -0,0 +1,4 @@
1
+ export interface IPgpEncryptModuleInterface {
2
+ encrypt(pgpKey: any, dataToEncrypt: any): Promise<string>;
3
+ decrypt(pgpKey: any, encryptedData: any, passphrase?: string): Promise<string>;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pgp-encrypt.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pgp-encrypt.interface.js","sourceRoot":"","sources":["../../src/pgp-encrypt/pgp-encrypt.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare class PgpEncryptModule {
2
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.PgpEncryptModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const pgp_encrypt_service_1 = require("./pgp-encrypt.service");
12
+ let PgpEncryptModule = class PgpEncryptModule {
13
+ };
14
+ PgpEncryptModule = __decorate([
15
+ (0, common_1.Module)({
16
+ providers: [pgp_encrypt_service_1.PgpEncryptService],
17
+ exports: [pgp_encrypt_service_1.PgpEncryptService],
18
+ })
19
+ ], PgpEncryptModule);
20
+ exports.PgpEncryptModule = PgpEncryptModule;
21
+ //# sourceMappingURL=pgp-encrypt.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pgp-encrypt.module.js","sourceRoot":"","sources":["../../src/pgp-encrypt/pgp-encrypt.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+DAA0D;AAMnD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,gBAAgB;IAJ5B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,uCAAiB,CAAC;QAC9B,OAAO,EAAE,CAAC,uCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG;AAAnB,4CAAgB"}
@@ -0,0 +1,5 @@
1
+ import { IPgpEncryptModuleInterface } from './pgp-encrypt.interface';
2
+ export declare class PgpEncryptService implements IPgpEncryptModuleInterface {
3
+ encrypt(pgpKey: any, dataToEncrypt: any): Promise<string>;
4
+ decrypt(pgpKey: any, encryptedData: any, passphrase?: string): Promise<string>;
5
+ }
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.PgpEncryptService = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const openpgp = require("openpgp");
12
+ let PgpEncryptService = class PgpEncryptService {
13
+ async encrypt(pgpKey, dataToEncrypt) {
14
+ try {
15
+ const publicKey = await openpgp.readKey({
16
+ armoredKey: pgpKey,
17
+ });
18
+ const encrypted = await openpgp.encrypt({
19
+ message: await openpgp.createMessage({ text: dataToEncrypt }),
20
+ encryptionKeys: publicKey,
21
+ format: 'armored',
22
+ });
23
+ return encrypted.toString();
24
+ }
25
+ catch (error) {
26
+ throw new Error(`File encryption error: \n ${error}`);
27
+ }
28
+ }
29
+ async decrypt(pgpKey, encryptedData, passphrase) {
30
+ try {
31
+ const openpgpPrivatekey = await openpgp.readPrivateKey({
32
+ armoredKey: pgpKey,
33
+ });
34
+ const decryptKeyOptions = {
35
+ privateKey: openpgpPrivatekey,
36
+ config: {
37
+ allowInsecureDecryptionWithSigningKeys: true,
38
+ allowUnauthenticatedMessages: true,
39
+ },
40
+ };
41
+ let privateKey = openpgpPrivatekey;
42
+ if (!!passphrase) {
43
+ decryptKeyOptions.passphrase = passphrase;
44
+ privateKey = await openpgp.decryptKey(decryptKeyOptions);
45
+ }
46
+ const armoredMessage = (await openpgp.createMessage({
47
+ text: encryptedData,
48
+ format: 'utf8',
49
+ })).getText();
50
+ const message = await openpgp.readMessage({
51
+ armoredMessage,
52
+ });
53
+ const { data: decryptedData } = await openpgp.decrypt({
54
+ message,
55
+ decryptionKeys: privateKey,
56
+ format: 'utf8',
57
+ config: {
58
+ allowInsecureDecryptionWithSigningKeys: true,
59
+ allowUnauthenticatedMessages: true,
60
+ },
61
+ });
62
+ return decryptedData.toString();
63
+ }
64
+ catch (error) {
65
+ throw new Error(`File decryption error: \n ${error}`);
66
+ }
67
+ }
68
+ };
69
+ PgpEncryptService = __decorate([
70
+ (0, common_1.Injectable)()
71
+ ], PgpEncryptService);
72
+ exports.PgpEncryptService = PgpEncryptService;
73
+ //# sourceMappingURL=pgp-encrypt.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pgp-encrypt.service.js","sourceRoot":"","sources":["../../src/pgp-encrypt/pgp-encrypt.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,mCAAmC;AAI5B,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACrB,KAAK,CAAC,OAAO,CAAC,MAAW,EAAE,aAAkB;QAClD,IAAI;YACF,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC;gBACtC,UAAU,EAAE,MAAM;aACnB,CAAC,CAAC;YACH,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC;gBACtC,OAAO,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;gBAC7D,cAAc,EAAE,SAAS;gBACzB,MAAM,EAAE,SAAS;aAClB,CAAC,CAAC;YACH,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;SAC7B;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,EAAE,CAAC,CAAC;SACvD;IACH,CAAC;IAEM,KAAK,CAAC,OAAO,CAClB,MAAW,EACX,aAAkB,EAClB,UAAmB;QAEnB,IAAI;YACF,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC;gBACrD,UAAU,EAAE,MAAM;aACnB,CAAC,CAAC;YAEH,MAAM,iBAAiB,GAInB;gBACF,UAAU,EAAE,iBAAiB;gBAC7B,MAAM,EAAE;oBACN,sCAAsC,EAAE,IAAI;oBAC5C,4BAA4B,EAAE,IAAI;iBACnC;aACF,CAAC;YAEF,IAAI,UAAU,GAAG,iBAAiB,CAAC;YAEnC,IAAI,CAAC,CAAC,UAAU,EAAE;gBAChB,iBAAiB,CAAC,UAAU,GAAG,UAAU,CAAC;gBAC1C,UAAU,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;aAC1D;YAED,MAAM,cAAc,GAAG,CACrB,MAAM,OAAO,CAAC,aAAa,CAAC;gBAC1B,IAAI,EAAE,aAAa;gBACnB,MAAM,EAAE,MAAM;aACf,CAAC,CACH,CAAC,OAAO,EAAE,CAAC;YACZ,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC;gBACxC,cAAc;aACf,CAAC,CAAC;YACH,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC;gBACpD,OAAO;gBACP,cAAc,EAAE,UAAU;gBAC1B,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE;oBACN,sCAAsC,EAAE,IAAI;oBAC5C,4BAA4B,EAAE,IAAI;iBACnC;aACF,CAAC,CAAC;YAEH,OAAO,aAAa,CAAC,QAAQ,EAAE,CAAC;SACjC;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,EAAE,CAAC,CAAC;SACvD;IACH,CAAC;CACF,CAAA;AAtEY,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAsE7B;AAtEY,8CAAiB"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="node" />
2
+ import * as NodeRSA from 'node-rsa';
3
+ export interface RsaEncryptInterface {
4
+ encrypt(message: NodeRSA.Data, key: NodeRSA.KeyBits, messageEncoding: NodeRSA.Encoding): string;
5
+ decrypt(message: string | Buffer, key: NodeRSA.Key, messageEncoding: NodeRSA.Encoding): string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=rsa-encrypt.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsa-encrypt.interface.js","sourceRoot":"","sources":["../../src/rsa-encrypt/rsa-encrypt.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare class RsaEncryptModule {
2
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.RsaEncryptModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const rsa_encrypt_service_1 = require("./rsa-encrypt.service");
12
+ let RsaEncryptModule = class RsaEncryptModule {
13
+ };
14
+ RsaEncryptModule = __decorate([
15
+ (0, common_1.Module)({
16
+ providers: [rsa_encrypt_service_1.RsaEncryptService],
17
+ exports: [rsa_encrypt_service_1.RsaEncryptService],
18
+ })
19
+ ], RsaEncryptModule);
20
+ exports.RsaEncryptModule = RsaEncryptModule;
21
+ //# sourceMappingURL=rsa-encrypt.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsa-encrypt.module.js","sourceRoot":"","sources":["../../src/rsa-encrypt/rsa-encrypt.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+DAA0D;AAMnD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,gBAAgB;IAJ5B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,uCAAiB,CAAC;QAC9B,OAAO,EAAE,CAAC,uCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG;AAAnB,4CAAgB"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="node" />
2
+ import * as NodeRSA from 'node-rsa';
3
+ import { RsaEncryptInterface } from './rsa-encrypt.interface';
4
+ export declare class RsaEncryptService implements RsaEncryptInterface {
5
+ encrypt(message: NodeRSA.Data, key: NodeRSA.KeyBits, messageEncoding?: NodeRSA.Encoding): string;
6
+ decrypt(message: string | Buffer, key: NodeRSA.Key, messageEncoding?: NodeRSA.Encoding): string;
7
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.RsaEncryptService = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const NodeRSA = require("node-rsa");
12
+ let RsaEncryptService = class RsaEncryptService {
13
+ encrypt(message, key, messageEncoding = 'base64') {
14
+ const rsa = new NodeRSA(key);
15
+ const encryptedData = rsa.encrypt(message, messageEncoding);
16
+ return encryptedData;
17
+ }
18
+ decrypt(message, key, messageEncoding = 'buffer') {
19
+ const rsa = new NodeRSA(key);
20
+ const decrypt = rsa.decrypt(message, messageEncoding).toString();
21
+ return decrypt;
22
+ }
23
+ };
24
+ RsaEncryptService = __decorate([
25
+ (0, common_1.Injectable)()
26
+ ], RsaEncryptService);
27
+ exports.RsaEncryptService = RsaEncryptService;
28
+ //# sourceMappingURL=rsa-encrypt.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsa-encrypt.service.js","sourceRoot":"","sources":["../../src/rsa-encrypt/rsa-encrypt.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,oCAAoC;AAO7B,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAEnB,OAAO,CACV,OAAqB,EACrB,GAAoB,EACpB,kBAAoC,QAAQ;QAE5C,MAAM,GAAG,GAAY,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,aAAa,GAAW,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QACpE,OAAO,aAAa,CAAC;IACzB,CAAC;IAEM,OAAO,CACV,OAAwB,EACxB,GAAgB,EAChB,kBAAoC,QAAQ;QAE5C,MAAM,GAAG,GAAY,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,OAAO,GAAW,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,QAAQ,EAAE,CAAC;QACzE,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ,CAAA;AArBY,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAqB7B;AArBY,8CAAiB"}