@certd/basic 1.31.3 → 1.31.5
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/.eslintrc +2 -2
- package/.prettierrc +7 -0
- package/CHANGELOG.md +8 -0
- package/build.md +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/util.hash.d.ts +2 -2
- package/dist/utils/util.hash.js +4 -4
- package/package.json +2 -2
package/.eslintrc
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
17
17
|
"@typescript-eslint/ban-ts-ignore": "off",
|
|
18
18
|
"@typescript-eslint/no-explicit-any": "off",
|
|
19
|
-
|
|
20
|
-
"
|
|
19
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
20
|
+
"@typescript-eslint/no-unused-vars": "off"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/.prettierrc
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.31.5](https://github.com/certd/certd/compare/v1.31.4...v1.31.5) (2025-03-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @certd/basic
|
|
9
|
+
|
|
10
|
+
## [1.31.4](https://github.com/certd/certd/compare/v1.31.3...v1.31.4) (2025-03-21)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @certd/basic
|
|
13
|
+
|
|
6
14
|
## [1.31.3](https://github.com/certd/certd/compare/v1.31.2...v1.31.3) (2025-03-13)
|
|
7
15
|
|
|
8
16
|
### Performance Improvements
|
package/build.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
01
|
|
1
|
+
15:01
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare const utils: {
|
|
|
32
32
|
md5: (data: string, digest?: import("crypto").BinaryToTextEncoding) => string;
|
|
33
33
|
sha256: (data: string, digest?: import("crypto").BinaryToTextEncoding) => string;
|
|
34
34
|
base64: (data: string) => string;
|
|
35
|
-
|
|
35
|
+
hmacSha256: (data: string, digest?: import("crypto").BinaryToTextEncoding) => string;
|
|
36
36
|
};
|
|
37
37
|
promises: {
|
|
38
38
|
TimeoutPromise: typeof import("./util.promise.js").TimeoutPromise;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BinaryToTextEncoding } from 'crypto';
|
|
2
2
|
declare function md5(data: string, digest?: BinaryToTextEncoding): string;
|
|
3
3
|
declare function sha256(data: string, digest?: BinaryToTextEncoding): string;
|
|
4
|
-
declare function
|
|
4
|
+
declare function hmacSha256(data: string, digest?: BinaryToTextEncoding): string;
|
|
5
5
|
declare function base64(data: string): string;
|
|
6
6
|
export declare const hashUtils: {
|
|
7
7
|
md5: typeof md5;
|
|
8
8
|
sha256: typeof sha256;
|
|
9
9
|
base64: typeof base64;
|
|
10
|
-
|
|
10
|
+
hmacSha256: typeof hmacSha256;
|
|
11
11
|
};
|
|
12
12
|
export {};
|
package/dist/utils/util.hash.js
CHANGED
|
@@ -5,8 +5,8 @@ function md5(data, digest = 'hex') {
|
|
|
5
5
|
function sha256(data, digest = 'hex') {
|
|
6
6
|
return crypto.createHash('sha256').update(data).digest(digest);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
return crypto.createHmac('sha256', Buffer.
|
|
8
|
+
function hmacSha256(data, digest = 'base64') {
|
|
9
|
+
return crypto.createHmac('sha256', data).update(Buffer.alloc(0)).digest(digest);
|
|
10
10
|
}
|
|
11
11
|
function base64(data) {
|
|
12
12
|
return Buffer.from(data).toString('base64');
|
|
@@ -15,6 +15,6 @@ export const hashUtils = {
|
|
|
15
15
|
md5,
|
|
16
16
|
sha256,
|
|
17
17
|
base64,
|
|
18
|
-
|
|
18
|
+
hmacSha256,
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL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QUFTLEdBQUc7SUFDdkIsR0FBRztJQUNILE1BQU07SUFDTixNQUFNO0lBQ04sVUFBVTtDQUNYLENBQUMifQ==
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@certd/basic",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.31.
|
|
4
|
+
"version": "1.31.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"tslib": "^2.8.1",
|
|
45
45
|
"typescript": "^5.4.2"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "92446cb048e1bd7c57f36992d9ba376e9f4e7d3b"
|
|
48
48
|
}
|