corexxx 1.0.80 → 1.0.81
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/dist/dcrypto.d.ts +1 -4
- package/dist/dcrypto.js +16 -19
- package/dist/dcrypto.js.map +1 -1
- package/package.json +1 -2
- package/src/dcrypto.ts +4 -3
package/dist/dcrypto.d.ts
CHANGED
package/dist/dcrypto.js
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/*
|
|
4
|
+
broken react native
|
|
5
5
|
const Cryptr = require("cryptr");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export namespace dcrypto {
|
|
7
|
+
export function encrypt(str: string, key: string): string {
|
|
8
|
+
dassert.verifyNotNullAndEmpty(key, "must pass a valid key");
|
|
9
|
+
return new Cryptr(key).encrypt(str);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function decrypt(str: string, key: string): string {
|
|
13
|
+
dassert.verifyNotNullAndEmpty(key, "must pass a valid key");
|
|
14
|
+
try {
|
|
15
|
+
return new Cryptr(key).decrypt(str);
|
|
16
|
+
} catch (e) {
|
|
17
|
+
throw new Error("Invalid key - not able to decrypt");
|
|
11
18
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
dassert_1.dassert.verifyNotNullAndEmpty(key, "must pass a valid key");
|
|
15
|
-
try {
|
|
16
|
-
return new Cryptr(key).decrypt(str);
|
|
17
|
-
}
|
|
18
|
-
catch (e) {
|
|
19
|
-
throw new Error("Invalid key - not able to decrypt");
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
dcrypto.decrypt = decrypt;
|
|
23
|
-
})(dcrypto = exports.dcrypto || (exports.dcrypto = {}));
|
|
19
|
+
}
|
|
20
|
+
}*/
|
|
24
21
|
//# sourceMappingURL=dcrypto.js.map
|
package/dist/dcrypto.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dcrypto.js","sourceRoot":"","sources":["../src/dcrypto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dcrypto.js","sourceRoot":"","sources":["../src/dcrypto.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;;GAiBG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "corexxx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.81",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"@types/underscore": "^1.11.3",
|
|
17
17
|
"axios": "^0.21.1",
|
|
18
18
|
"corexxx": "1.0.71",
|
|
19
|
-
"cryptr": "^6.0.3",
|
|
20
19
|
"csvtojson": "^2.0.10",
|
|
21
20
|
"moment": "^2.29.1",
|
|
22
21
|
"moment-timezone": "^0.5.34",
|
package/src/dcrypto.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export {};
|
|
2
|
+
/*
|
|
3
|
+
broken react native
|
|
3
4
|
const Cryptr = require("cryptr");
|
|
4
5
|
export namespace dcrypto {
|
|
5
6
|
export function encrypt(str: string, key: string): string {
|
|
@@ -15,4 +16,4 @@ export namespace dcrypto {
|
|
|
15
16
|
throw new Error("Invalid key - not able to decrypt");
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
}
|
|
19
|
+
}*/
|