nestjs-cryptography 3.2.5 → 3.2.7
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 +1 -1
- package/dist/cryptography.module-definition.d.ts +2 -2
- package/dist/cryptography.service.d.ts +14 -14
- package/dist/interfaces/cryptography-options.interface.d.ts +2 -0
- package/dist/interfaces/generic-options.interface.d.ts +2 -0
- package/eslint.config.mjs +2 -1
- package/package.json +19 -19
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[](https://codecov.io/github/mjorgegulab/nestjs-cryptography)
|
|
2
|
-
[](https://app.codacy.com/gh/cipher-fox/nestjs-cryptography/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
3
3
|
[](https://github.com/mjorgegulab/nestjs-cryptography/actions/workflows/github-code-scanning/codeql)
|
|
4
4
|
[](https://nestjs-cryptography.cypher-fox.com)
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<
|
|
1
|
+
import { CryptographyOptions } from './interfaces';
|
|
2
|
+
export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<CryptographyOptions, "forRoot", "create", {
|
|
3
3
|
isGlobal: boolean;
|
|
4
4
|
}>, MODULE_OPTIONS_TOKEN: string | symbol;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as crypto from 'node:crypto';
|
|
2
|
-
import {
|
|
2
|
+
import { CryptographyOptions, GenericOptions } from './interfaces';
|
|
3
3
|
export declare class CryptographyService {
|
|
4
4
|
private moduleOptions;
|
|
5
|
-
constructor(moduleOptions:
|
|
5
|
+
constructor(moduleOptions: CryptographyOptions);
|
|
6
6
|
private convertInputData;
|
|
7
7
|
private checkModuleOptions;
|
|
8
8
|
private extractIV;
|
|
@@ -20,16 +20,16 @@ export declare class CryptographyService {
|
|
|
20
20
|
deriveMasterKey(masterKey: string | Buffer, salt: Buffer, length?: number): Promise<Buffer>;
|
|
21
21
|
createArgon2HashFromPassword(data: string | Buffer): Promise<Buffer>;
|
|
22
22
|
verifyArgon2HashFromPassword(hash: string, data: string | Buffer): Promise<boolean>;
|
|
23
|
-
createCustomHash(algorithm: string, data: string | Buffer, options?:
|
|
24
|
-
verifyCustomHash(algorithm: string, data: string | Buffer, oldHash: string | Buffer, options?:
|
|
25
|
-
createSecureHash(data: string | Buffer, options?:
|
|
26
|
-
verifySecureHash(data: string | Buffer, oldHash: string | Buffer, options?:
|
|
27
|
-
createCustomHmac(algorithm: string, key: string | Buffer, data: string | Buffer, options?:
|
|
28
|
-
verifyCustomHmac(algorithm: string, key: string | Buffer, data: string | Buffer, oldHmac: string | Buffer, options?:
|
|
29
|
-
createSecureHmac(data: string | Buffer, options?:
|
|
30
|
-
verifySecureHmac(data: string | Buffer, oldHmac: string | Buffer, options?:
|
|
31
|
-
symmetricDataEncrypt(data: string | Buffer, key: string | Buffer, options?:
|
|
32
|
-
symmetricDataDecrypt(data: string | Buffer, key: string | Buffer, options?:
|
|
33
|
-
symmetricSecureDataEncrypt(data: string | Buffer, options?:
|
|
34
|
-
symmetricSecureDataDecrypt(data: string | Buffer, options?:
|
|
23
|
+
createCustomHash(algorithm: string, data: string | Buffer, options?: GenericOptions): Buffer;
|
|
24
|
+
verifyCustomHash(algorithm: string, data: string | Buffer, oldHash: string | Buffer, options?: GenericOptions): boolean;
|
|
25
|
+
createSecureHash(data: string | Buffer, options?: GenericOptions): Buffer;
|
|
26
|
+
verifySecureHash(data: string | Buffer, oldHash: string | Buffer, options?: GenericOptions): boolean;
|
|
27
|
+
createCustomHmac(algorithm: string, key: string | Buffer, data: string | Buffer, options?: GenericOptions): Buffer;
|
|
28
|
+
verifyCustomHmac(algorithm: string, key: string | Buffer, data: string | Buffer, oldHmac: string | Buffer, options?: GenericOptions): boolean;
|
|
29
|
+
createSecureHmac(data: string | Buffer, options?: GenericOptions): Buffer;
|
|
30
|
+
verifySecureHmac(data: string | Buffer, oldHmac: string | Buffer, options?: GenericOptions): boolean;
|
|
31
|
+
symmetricDataEncrypt(data: string | Buffer, key: string | Buffer, options?: GenericOptions): Promise<Buffer>;
|
|
32
|
+
symmetricDataDecrypt(data: string | Buffer, key: string | Buffer, options?: GenericOptions): Promise<Buffer>;
|
|
33
|
+
symmetricSecureDataEncrypt(data: string | Buffer, options?: GenericOptions): Promise<Buffer>;
|
|
34
|
+
symmetricSecureDataDecrypt(data: string | Buffer, options?: GenericOptions): Promise<Buffer>;
|
|
35
35
|
}
|
package/eslint.config.mjs
CHANGED
|
@@ -29,7 +29,8 @@ export default tseslint.config(
|
|
|
29
29
|
rules: {
|
|
30
30
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
31
31
|
'@typescript-eslint/no-floating-promises': 'warn',
|
|
32
|
-
'@typescript-eslint/no-unsafe-argument': 'warn'
|
|
32
|
+
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
33
|
+
'@typescript-eslint/no-empty-object-type': 'off'
|
|
33
34
|
},
|
|
34
35
|
},
|
|
35
36
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nestjs-cryptography",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Marc Jorge Gonzalez",
|
|
6
6
|
"url": "https://github.com/cipher-fox"
|
|
@@ -30,34 +30,34 @@
|
|
|
30
30
|
"argon2": "^0.44.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@eslint/eslintrc": "^3.3.
|
|
34
|
-
"@eslint/js": "^
|
|
35
|
-
"@nestjs/cli": "^11.0.
|
|
36
|
-
"@nestjs/common": "^11.1.
|
|
37
|
-
"@nestjs/core": "^11.1.
|
|
38
|
-
"@nestjs/platform-express": "^11.1.
|
|
39
|
-
"@nestjs/schematics": "^11.0
|
|
40
|
-
"@nestjs/testing": "^11.1.
|
|
33
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
34
|
+
"@eslint/js": "^10.0.1",
|
|
35
|
+
"@nestjs/cli": "^11.0.21",
|
|
36
|
+
"@nestjs/common": "^11.1.19",
|
|
37
|
+
"@nestjs/core": "^11.1.19",
|
|
38
|
+
"@nestjs/platform-express": "^11.1.19",
|
|
39
|
+
"@nestjs/schematics": "^11.1.0",
|
|
40
|
+
"@nestjs/testing": "^11.1.19",
|
|
41
41
|
"@types/express": "^5.0.6",
|
|
42
42
|
"@types/jest": "30.0.0",
|
|
43
|
-
"@types/node": "25.0
|
|
44
|
-
"@types/supertest": "^
|
|
45
|
-
"eslint": "^
|
|
43
|
+
"@types/node": "25.6.0",
|
|
44
|
+
"@types/supertest": "^7.2.0",
|
|
45
|
+
"eslint": "^10.2.1",
|
|
46
46
|
"eslint-config-prettier": "^10.1.8",
|
|
47
|
-
"eslint-plugin-prettier": "^5.5.
|
|
48
|
-
"jest": "30.
|
|
49
|
-
"prettier": "^3.
|
|
47
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
48
|
+
"jest": "30.3.0",
|
|
49
|
+
"prettier": "^3.8.3",
|
|
50
50
|
"reflect-metadata": "^0.2.2",
|
|
51
|
-
"rimraf": "^6.1.
|
|
51
|
+
"rimraf": "^6.1.3",
|
|
52
52
|
"rxjs": "^7.8.2",
|
|
53
53
|
"source-map-support": "^0.5.21",
|
|
54
54
|
"supertest": "^7.2.2",
|
|
55
|
-
"ts-jest": "^29.4.
|
|
56
|
-
"ts-loader": "^9.5.
|
|
55
|
+
"ts-jest": "^29.4.9",
|
|
56
|
+
"ts-loader": "^9.5.7",
|
|
57
57
|
"ts-node": "^10.9.2",
|
|
58
58
|
"tsconfig-paths": "4.2.0",
|
|
59
59
|
"typescript": "^5.9.3",
|
|
60
|
-
"typescript-eslint": "^8.
|
|
60
|
+
"typescript-eslint": "^8.59.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@nestjs/common": "^9.0.0 || ^10.0.0 || ^11.0.0",
|