@sequencemedia/crypto 1.2.290 → 1.2.291
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/index.d.mts +5 -0
- package/index.mjs +5 -0
- package/jsconfig.json +5 -0
- package/package.json +5 -10
- package/src/index.d.mts +2 -18
- package/src/index.mjs +1 -1
- package/src/shell/decrypt.d.mts +1 -0
- package/src/shell/decrypt.mjs +2 -2
- package/src/shell/encrypt.d.mts +1 -0
- package/src/shell/encrypt.mjs +2 -2
- package/tsconfig.json +7 -5
- package/crypto.d.mts +0 -5
package/index.d.mts
ADDED
package/index.mjs
ADDED
package/jsconfig.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequencemedia/crypto",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.291",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"crypto",
|
|
6
6
|
"node",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"decode",
|
|
12
12
|
"shell"
|
|
13
13
|
],
|
|
14
|
-
"main": "./
|
|
14
|
+
"main": "./index.mjs",
|
|
15
15
|
"type": "module",
|
|
16
|
-
"types": "./
|
|
16
|
+
"types": "./index.d.mts",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Jonathan Perry for Sequence Media Limited",
|
|
19
19
|
"email": "sequencemedia@sequencemedia.net",
|
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
"lint:js:fix": "npm run lint:js -- --fix",
|
|
32
32
|
"lint:ts": "eslint . --ext .mts,.cts",
|
|
33
33
|
"lint:ts:fix": "npm run lint:ts -- --fix",
|
|
34
|
-
"prepare": "husky"
|
|
35
|
-
"types": "tsc src/**/*.mjs --declaration --allowJs --emitDeclarationOnly"
|
|
34
|
+
"prepare": "husky"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
37
|
"@babel/core": "^7.26.9",
|
|
@@ -45,10 +44,6 @@
|
|
|
45
44
|
"eslint": "8.57.1",
|
|
46
45
|
"eslint-config-love": "47.0.0",
|
|
47
46
|
"eslint-config-standard": "^17.1.0",
|
|
48
|
-
"husky": "^9.1.7"
|
|
49
|
-
"typescript": "^5.7.3"
|
|
50
|
-
},
|
|
51
|
-
"exports": {
|
|
52
|
-
".": "./src/index.mjs"
|
|
47
|
+
"husky": "^9.1.7"
|
|
53
48
|
}
|
|
54
49
|
}
|
package/src/index.d.mts
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {string} secret
|
|
3
|
-
* @returns {string}
|
|
4
|
-
*/
|
|
5
1
|
export function hashKey (secret: string): string
|
|
6
|
-
|
|
7
|
-
* @param {Buffer} buffer
|
|
8
|
-
* @param {string} secret
|
|
9
|
-
* @param {number} [bytes]
|
|
10
|
-
* @param {string} [algorithm]
|
|
11
|
-
* @returns {Buffer}
|
|
12
|
-
*/
|
|
2
|
+
|
|
13
3
|
export function encrypt (buffer: Buffer, secret: string, bytes?: number, algorithm?: string): Buffer
|
|
14
|
-
|
|
15
|
-
* @param {Buffer} buffer
|
|
16
|
-
* @param {string} secret
|
|
17
|
-
* @param {number} [bytes]
|
|
18
|
-
* @param {string} [algorithm]
|
|
19
|
-
* @returns {Buffer}
|
|
20
|
-
*/
|
|
4
|
+
|
|
21
5
|
export function decrypt (buffer: Buffer, secret: string, bytes?: number, algorithm?: string): Buffer
|
package/src/index.mjs
CHANGED
package/src/shell/decrypt.d.mts
CHANGED
package/src/shell/decrypt.mjs
CHANGED
package/src/shell/encrypt.d.mts
CHANGED
package/src/shell/encrypt.mjs
CHANGED
package/tsconfig.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"module": "
|
|
3
|
+
"module": "NodeNext",
|
|
4
|
+
"target": "ESNext",
|
|
4
5
|
"allowJs": true,
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
6
|
+
"checkJs": true,
|
|
7
|
+
"noEmit": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"baseUrl": "."
|
|
9
11
|
}
|
|
10
12
|
}
|
package/crypto.d.mts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare module '@sequencemedia/crypto' {
|
|
2
|
-
export function hashKey (secret: string): string
|
|
3
|
-
export function encrypt (buffer: Buffer, secret: string, bytes?: number, algorithm?: string): Buffer
|
|
4
|
-
export function decrypt (buffer: Buffer, secret: string, bytes?: number, algorithm?: string): Buffer
|
|
5
|
-
}
|