@syncular/core 0.21.0 → 0.22.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/dist/crypto.d.ts +12 -0
- package/dist/crypto.js +12 -0
- package/package.json +1 -1
- package/src/crypto.ts +13 -0
package/dist/crypto.d.ts
CHANGED
|
@@ -19,6 +19,18 @@ export declare class DecryptError extends Error {
|
|
|
19
19
|
readonly code = "client.decrypt_failed";
|
|
20
20
|
readonly retryable = false;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Client-local encrypt failure (SPEC.md §5.11, §10.3). Never on the wire.
|
|
24
|
+
* Raised at the encode-at-send seam when the key id cannot be resolved
|
|
25
|
+
* from the present columns or the stored local row, or the selected key
|
|
26
|
+
* is unknown. Not retryable unmodified. Distinct from {@link DecryptError},
|
|
27
|
+
* which is apply-seam only.
|
|
28
|
+
*/
|
|
29
|
+
export declare class EncryptError extends Error {
|
|
30
|
+
readonly name = "EncryptError";
|
|
31
|
+
readonly code = "client.encrypt_failed";
|
|
32
|
+
readonly retryable = false;
|
|
33
|
+
}
|
|
22
34
|
/**
|
|
23
35
|
* Injectable nonce source (SPEC.md §5.11 nonce discipline). Production uses
|
|
24
36
|
* {@link secureRandomNonce}; crypto golden vectors inject a fixed nonce. A
|
package/dist/crypto.js
CHANGED
|
@@ -30,6 +30,18 @@ export class DecryptError extends Error {
|
|
|
30
30
|
code = 'client.decrypt_failed';
|
|
31
31
|
retryable = false;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Client-local encrypt failure (SPEC.md §5.11, §10.3). Never on the wire.
|
|
35
|
+
* Raised at the encode-at-send seam when the key id cannot be resolved
|
|
36
|
+
* from the present columns or the stored local row, or the selected key
|
|
37
|
+
* is unknown. Not retryable unmodified. Distinct from {@link DecryptError},
|
|
38
|
+
* which is apply-seam only.
|
|
39
|
+
*/
|
|
40
|
+
export class EncryptError extends Error {
|
|
41
|
+
name = 'EncryptError';
|
|
42
|
+
code = 'client.encrypt_failed';
|
|
43
|
+
retryable = false;
|
|
44
|
+
}
|
|
33
45
|
export function secureRandomNonce() {
|
|
34
46
|
const nonce = new Uint8Array(NONCE_LENGTH);
|
|
35
47
|
crypto.getRandomValues(nonce);
|
package/package.json
CHANGED
package/src/crypto.ts
CHANGED
|
@@ -48,6 +48,19 @@ export class DecryptError extends Error {
|
|
|
48
48
|
readonly retryable = false;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Client-local encrypt failure (SPEC.md §5.11, §10.3). Never on the wire.
|
|
53
|
+
* Raised at the encode-at-send seam when the key id cannot be resolved
|
|
54
|
+
* from the present columns or the stored local row, or the selected key
|
|
55
|
+
* is unknown. Not retryable unmodified. Distinct from {@link DecryptError},
|
|
56
|
+
* which is apply-seam only.
|
|
57
|
+
*/
|
|
58
|
+
export class EncryptError extends Error {
|
|
59
|
+
override readonly name = 'EncryptError';
|
|
60
|
+
readonly code = 'client.encrypt_failed';
|
|
61
|
+
readonly retryable = false;
|
|
62
|
+
}
|
|
63
|
+
|
|
51
64
|
/**
|
|
52
65
|
* Injectable nonce source (SPEC.md §5.11 nonce discipline). Production uses
|
|
53
66
|
* {@link secureRandomNonce}; crypto golden vectors inject a fixed nonce. A
|