asherah 1.0.32 → 1.0.35
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.
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/asherah.js
CHANGED
|
@@ -3,14 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.encrypt = exports.decrypt = exports.setup = void 0;
|
|
6
|
+
exports.encrypt = exports.decrypt = exports.shutdown = exports.setup = void 0;
|
|
7
7
|
const cobhan_1 = require("cobhan");
|
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
|
9
9
|
const binaries_path = find_binaries();
|
|
10
10
|
const libasherah = (0, cobhan_1.load_platform_library)(binaries_path, 'libasherah', {
|
|
11
11
|
'Encrypt': ['int32', ['pointer', 'pointer', 'pointer', 'pointer', 'pointer', 'pointer', 'pointer']],
|
|
12
12
|
'Decrypt': ['int32', ['pointer', 'pointer', 'pointer', 'int64', 'pointer', 'int64', 'pointer']],
|
|
13
|
-
'SetupJson': ['int32', ['pointer']]
|
|
13
|
+
'SetupJson': ['int32', ['pointer']],
|
|
14
|
+
'Shutdown': ['void', []]
|
|
14
15
|
});
|
|
15
16
|
function find_binaries() {
|
|
16
17
|
if (fs_1.default.existsSync('node_modules/asherah/binaries')) {
|
|
@@ -29,6 +30,10 @@ function setup(config) {
|
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
exports.setup = setup;
|
|
33
|
+
function shutdown() {
|
|
34
|
+
libasherah.Shutdown();
|
|
35
|
+
}
|
|
36
|
+
exports.shutdown = shutdown;
|
|
32
37
|
function decrypt(partitionId, dataRowRecord) {
|
|
33
38
|
const partitionIdBuffer = (0, cobhan_1.string_to_cbuffer)(partitionId);
|
|
34
39
|
const encryptedDataBuffer = (0, cobhan_1.buffer_to_cbuffer)(dataRowRecord.Data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asherah",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "Asherah envelope encryption and key rotation library",
|
|
5
5
|
"main": "dist/asherah.js",
|
|
6
6
|
"repository": {
|
|
@@ -22,9 +22,6 @@
|
|
|
22
22
|
"binaries/*.dylib",
|
|
23
23
|
"dist/index.d.ts"
|
|
24
24
|
],
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"cobhan": "^1.0.22"
|
|
27
|
-
},
|
|
28
25
|
"devDependencies": {
|
|
29
26
|
"@types/chai": "^4.3.0",
|
|
30
27
|
"@types/mocha": "^9.1.0",
|
|
@@ -46,5 +43,8 @@
|
|
|
46
43
|
"spec": "test/**/*.spec.ts",
|
|
47
44
|
"require": "ts-node/register"
|
|
48
45
|
},
|
|
49
|
-
"types": "dist/
|
|
46
|
+
"types": "dist/asherah.d.ts",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"cobhan": "^1.0.27"
|
|
49
|
+
}
|
|
50
50
|
}
|