@8ms/helpers 2.4.6 → 2.4.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.
@@ -1,15 +1,3 @@
1
- //#region src/crypto/server/getDecrypt.d.ts
2
- /**
3
- * Decrypt an encoding string using a salt.
4
- */
5
- declare const getDecrypt: (appSalt: string, input: string) => string;
6
- //#endregion
7
- //#region src/crypto/server/getEncrypt.d.ts
8
- /**
9
- * Encrypt an encoding string using a salt.
10
- */
11
- declare const getEncrypt: (appSalt: string, input: string) => string;
12
- //#endregion
13
1
  //#region src/crypto/server/getMd5.d.ts
14
2
  /**
15
3
  * Encrypt a string using md5.
@@ -28,4 +16,4 @@ declare const getRandom: (length: number) => string;
28
16
  */
29
17
  declare const getSha256: (input: any) => string;
30
18
  //#endregion
31
- export { getDecrypt, getEncrypt, getMd5, getRandom, getSha256 };
19
+ export { getMd5, getRandom, getSha256 };
@@ -1,24 +1,5 @@
1
1
  import { t as __require } from "../../chunk-y_GBKt04.mjs";
2
2
  import { getString } from "../../string/index.mjs";
3
- import * as crypto from "crypto";
4
- //#region src/crypto/server/getDecrypt.ts
5
- /**
6
- * Decrypt an encoding string using a salt.
7
- */
8
- const getDecrypt = (appSalt, input) => {
9
- const decipher = crypto.createDecipheriv("aes-256-ecb", appSalt, null);
10
- return decipher.update(input, "hex", "utf8") + decipher.final("utf8");
11
- };
12
- //#endregion
13
- //#region src/crypto/server/getEncrypt.ts
14
- /**
15
- * Encrypt an encoding string using a salt.
16
- */
17
- const getEncrypt = (appSalt, input) => {
18
- const cipher = crypto.createCipheriv("aes-256-ecb", appSalt, null);
19
- return cipher.update(input, "utf8", "hex") + cipher.final("hex");
20
- };
21
- //#endregion
22
3
  //#region src/crypto/server/getMd5.ts
23
4
  /**
24
5
  * Encrypt a string using md5.
@@ -47,4 +28,4 @@ const getSha256 = (input) => {
47
28
  return crypto.createHash("sha256").update(inputString).digest("hex");
48
29
  };
49
30
  //#endregion
50
- export { getDecrypt, getEncrypt, getMd5, getRandom, getSha256 };
31
+ export { getMd5, getRandom, getSha256 };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "2.4.6",
4
+ "version": "2.4.7",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"