@edirect/encrypt-modules 11.0.39 → 11.0.41
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 +28 -3
- package/dist/README.md +28 -3
- package/dist/package.json +3 -3
- package/dist/src/bin-pgp-encrypt/bin-pgp-encrypt.service.d.ts.map +1 -1
- package/dist/src/bin-pgp-encrypt/bin-pgp-encrypt.service.js +2 -1
- package/dist/src/pgp-encrypt/pgp-encrypt.service.d.ts.map +1 -1
- package/dist/src/pgp-encrypt/pgp-encrypt.service.js +2 -1
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
# @edirect/encrypt-modules
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Encryption utilities and modules for Edirect applications. Provides services and helpers for encrypting and decrypting data, including support for PGP and other algorithms.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- PGP encryption and decryption helpers
|
|
8
|
+
- Utilities for secure data handling
|
|
9
|
+
- Integrates with NestJS and other Edirect modules
|
|
4
10
|
|
|
5
11
|
## Installation
|
|
6
12
|
|
|
7
|
-
```
|
|
8
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npm install @edirect/encrypt-modules
|
|
9
15
|
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Import and use the encryption services in your application:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { PgpEncryptService } from '@edirect/encrypt-modules';
|
|
23
|
+
|
|
24
|
+
const encrypted = await PgpEncryptService.encrypt(data, publicKey);
|
|
25
|
+
const decrypted = await PgpEncryptService.decrypt(
|
|
26
|
+
encrypted,
|
|
27
|
+
privateKey,
|
|
28
|
+
passphrase
|
|
29
|
+
);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Environment Variables
|
|
33
|
+
|
|
34
|
+
This package does not require environment variables by default, but you may provide keys or secrets via environment variables as needed for your encryption setup.
|
package/dist/README.md
CHANGED
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
# @edirect/encrypt-modules
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Encryption utilities and modules for Edirect applications. Provides services and helpers for encrypting and decrypting data, including support for PGP and other algorithms.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- PGP encryption and decryption helpers
|
|
8
|
+
- Utilities for secure data handling
|
|
9
|
+
- Integrates with NestJS and other Edirect modules
|
|
4
10
|
|
|
5
11
|
## Installation
|
|
6
12
|
|
|
7
|
-
```
|
|
8
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npm install @edirect/encrypt-modules
|
|
9
15
|
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Import and use the encryption services in your application:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { PgpEncryptService } from '@edirect/encrypt-modules';
|
|
23
|
+
|
|
24
|
+
const encrypted = await PgpEncryptService.encrypt(data, publicKey);
|
|
25
|
+
const decrypted = await PgpEncryptService.decrypt(
|
|
26
|
+
encrypted,
|
|
27
|
+
privateKey,
|
|
28
|
+
passphrase
|
|
29
|
+
);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Environment Variables
|
|
33
|
+
|
|
34
|
+
This package does not require environment variables by default, but you may provide keys or secrets via environment variables as needed for your encryption setup.
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edirect/encrypt-modules",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.40",
|
|
4
4
|
"description": "Encrypt Modules",
|
|
5
5
|
"main": "./dist/src/index.js",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@nestjs/common": "^11.1.
|
|
20
|
+
"@nestjs/common": "^11.1.12",
|
|
21
21
|
"archiver": "7.0.1",
|
|
22
22
|
"archiver-zip-encrypted": "^2.0.0",
|
|
23
23
|
"node-rsa": "1.1.1",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/archiver": "^7.0.0",
|
|
30
|
-
"@types/node": "^25.0.
|
|
30
|
+
"@types/node": "^25.0.10",
|
|
31
31
|
"@types/node-rsa": "^1.1.4",
|
|
32
32
|
"@types/stream-buffers": "^3.0.8"
|
|
33
33
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin-pgp-encrypt.service.d.ts","sourceRoot":"","sources":["../../../src/bin-pgp-encrypt/bin-pgp-encrypt.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAE5E,qBACa,oBAAqB,YAAW,6BAA6B;IAC3D,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"bin-pgp-encrypt.service.d.ts","sourceRoot":"","sources":["../../../src/bin-pgp-encrypt/bin-pgp-encrypt.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAE5E,qBACa,oBAAqB,YAAW,6BAA6B;IAC3D,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAiB5D,OAAO,CAClB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,EAC3C,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC;CA4CnB"}
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BinPgpEncryptService = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
|
-
const openpgp = tslib_1.__importStar(require("openpgp"));
|
|
7
6
|
let BinPgpEncryptService = class BinPgpEncryptService {
|
|
8
7
|
async encrypt(pgpKey, dataToEncrypt) {
|
|
9
8
|
try {
|
|
9
|
+
const openpgp = await import('openpgp');
|
|
10
10
|
const publicKey = await openpgp.readKey({
|
|
11
11
|
armoredKey: pgpKey,
|
|
12
12
|
});
|
|
@@ -23,6 +23,7 @@ let BinPgpEncryptService = class BinPgpEncryptService {
|
|
|
23
23
|
}
|
|
24
24
|
async decrypt(pgpKey, encryptedData, passphrase) {
|
|
25
25
|
try {
|
|
26
|
+
const openpgp = await import('openpgp');
|
|
26
27
|
const openpgpPrivatekey = await openpgp.readPrivateKey({
|
|
27
28
|
armoredKey: pgpKey,
|
|
28
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pgp-encrypt.service.d.ts","sourceRoot":"","sources":["../../../src/pgp-encrypt/pgp-encrypt.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,qBACa,iBAAkB,YAAW,0BAA0B;IACrD,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"pgp-encrypt.service.d.ts","sourceRoot":"","sources":["../../../src/pgp-encrypt/pgp-encrypt.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,qBACa,iBAAkB,YAAW,0BAA0B;IACrD,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAiBzD,OAAO,CAClB,MAAM,EAAE,GAAG,EACX,aAAa,EAAE,GAAG,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC;CAkDnB"}
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PgpEncryptService = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
|
-
const openpgp = tslib_1.__importStar(require("openpgp"));
|
|
7
6
|
let PgpEncryptService = class PgpEncryptService {
|
|
8
7
|
async encrypt(pgpKey, dataToEncrypt) {
|
|
9
8
|
try {
|
|
9
|
+
const openpgp = await import('openpgp');
|
|
10
10
|
const publicKey = await openpgp.readKey({
|
|
11
11
|
armoredKey: pgpKey,
|
|
12
12
|
});
|
|
@@ -23,6 +23,7 @@ let PgpEncryptService = class PgpEncryptService {
|
|
|
23
23
|
}
|
|
24
24
|
async decrypt(pgpKey, encryptedData, passphrase) {
|
|
25
25
|
try {
|
|
26
|
+
const openpgp = await import('openpgp');
|
|
26
27
|
const openpgpPrivatekey = await openpgp.readPrivateKey({
|
|
27
28
|
armoredKey: pgpKey,
|
|
28
29
|
});
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edirect/encrypt-modules",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.41",
|
|
4
4
|
"description": "Encrypt Modules",
|
|
5
5
|
"packageScope": "@edirect",
|
|
6
6
|
"main": "./dist/src/index.js",
|
|
7
7
|
"types": "./dist/src/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"development": "./src/index.ts",
|
|
11
10
|
"import": "./dist/src/index.js",
|
|
12
11
|
"default": "./dist/src/index.js",
|
|
13
12
|
"require": "./dist/src/index.js",
|
|
@@ -19,7 +18,7 @@
|
|
|
19
18
|
"dist"
|
|
20
19
|
],
|
|
21
20
|
"dependencies": {
|
|
22
|
-
"@nestjs/common": "^11.1.
|
|
21
|
+
"@nestjs/common": "^11.1.12",
|
|
23
22
|
"archiver": "7.0.1",
|
|
24
23
|
"archiver-zip-encrypted": "^2.0.0",
|
|
25
24
|
"node-rsa": "1.1.1",
|
|
@@ -28,9 +27,9 @@
|
|
|
28
27
|
"tslib": "^2.8.1"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
|
-
"@nestjs/cli": "^11.0.
|
|
30
|
+
"@nestjs/cli": "^11.0.16",
|
|
32
31
|
"@types/archiver": "^7.0.0",
|
|
33
|
-
"@types/node": "^25.0.
|
|
32
|
+
"@types/node": "^25.0.10",
|
|
34
33
|
"@types/node-rsa": "^1.1.4",
|
|
35
34
|
"@types/stream-buffers": "^3.0.8"
|
|
36
35
|
},
|