@cipherstash/protect-ffi 0.15.0 → 0.16.0-0
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/lib/index.cjs +7 -0
- package/lib/index.d.cts +7 -0
- package/package.json +6 -6
package/lib/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.decryptBulk = exports.newClient = exports.encryptBulk = exports.encrypt = void 0;
|
|
5
5
|
exports.decrypt = decrypt;
|
|
6
|
+
exports.decryptBulkFallible = decryptBulkFallible;
|
|
6
7
|
var load_cjs_1 = require("./load.cjs");
|
|
7
8
|
Object.defineProperty(exports, "encrypt", { enumerable: true, get: function () { return load_cjs_1.encrypt; } });
|
|
8
9
|
Object.defineProperty(exports, "encryptBulk", { enumerable: true, get: function () { return load_cjs_1.encryptBulk; } });
|
|
@@ -18,3 +19,9 @@ function decrypt(client, ciphertext, lockContext, ctsToken) {
|
|
|
18
19
|
}
|
|
19
20
|
return (0, load_cjs_2.decrypt)(client, ciphertext);
|
|
20
21
|
}
|
|
22
|
+
function decryptBulkFallible(client, ciphertexts, ctsToken) {
|
|
23
|
+
if (ctsToken) {
|
|
24
|
+
return (0, load_cjs_2.decryptBulkFallible)(client, ciphertexts, ctsToken);
|
|
25
|
+
}
|
|
26
|
+
return (0, load_cjs_2.decryptBulkFallible)(client, ciphertexts);
|
|
27
|
+
}
|
package/lib/index.d.cts
CHANGED
|
@@ -9,8 +9,15 @@ declare module './load.cjs' {
|
|
|
9
9
|
function decrypt(client: Client, ciphertext: string, context?: Context, ctsToken?: CtsToken): Promise<string>;
|
|
10
10
|
function encryptBulk(client: Client, plaintextTargets: EncryptPayload[], ctsToken?: CtsToken): Promise<Encrypted[]>;
|
|
11
11
|
function decryptBulk(client: Client, ciphertexts: BulkDecryptPayload[], ctsToken?: CtsToken): Promise<string[]>;
|
|
12
|
+
function decryptBulkFallible(client: Client, ciphertexts: BulkDecryptPayload[], ctsToken?: CtsToken): Promise<DecryptResult[]>;
|
|
12
13
|
}
|
|
13
14
|
export declare function decrypt(client: Client, ciphertext: string, lockContext?: Context, ctsToken?: CtsToken): Promise<string>;
|
|
15
|
+
export declare function decryptBulkFallible(client: Client, ciphertexts: BulkDecryptPayload[], ctsToken?: CtsToken): Promise<DecryptResult[]>;
|
|
16
|
+
export type DecryptResult = {
|
|
17
|
+
data: string;
|
|
18
|
+
} | {
|
|
19
|
+
error: string;
|
|
20
|
+
};
|
|
14
21
|
export type EncryptPayload = {
|
|
15
22
|
plaintext: string;
|
|
16
23
|
column: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cipherstash/protect-ffi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0-0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.cjs",
|
|
6
6
|
"scripts": {
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"@neon-rs/load": "^0.1.82"
|
|
62
62
|
},
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@cipherstash/protect-ffi-win32-x64-msvc": "0.
|
|
65
|
-
"@cipherstash/protect-ffi-darwin-x64": "0.
|
|
66
|
-
"@cipherstash/protect-ffi-darwin-arm64": "0.
|
|
67
|
-
"@cipherstash/protect-ffi-linux-x64-gnu": "0.
|
|
68
|
-
"@cipherstash/protect-ffi-linux-arm64-gnu": "0.
|
|
64
|
+
"@cipherstash/protect-ffi-win32-x64-msvc": "0.16.0-0",
|
|
65
|
+
"@cipherstash/protect-ffi-darwin-x64": "0.16.0-0",
|
|
66
|
+
"@cipherstash/protect-ffi-darwin-arm64": "0.16.0-0",
|
|
67
|
+
"@cipherstash/protect-ffi-linux-x64-gnu": "0.16.0-0",
|
|
68
|
+
"@cipherstash/protect-ffi-linux-arm64-gnu": "0.16.0-0"
|
|
69
69
|
}
|
|
70
70
|
}
|