@thecorporation/corp-tools 26.3.44 → 26.3.46
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/browser.js +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -3639,6 +3639,14 @@ type WorkItemStatus = (typeof WorkItemStatus)[number];
|
|
|
3639
3639
|
declare const WorkflowType: readonly ["transfer", "fundraising"];
|
|
3640
3640
|
type WorkflowType = (typeof WorkflowType)[number];
|
|
3641
3641
|
|
|
3642
|
+
/**
|
|
3643
|
+
* Generate a Fernet-compatible encryption key.
|
|
3644
|
+
*
|
|
3645
|
+
* Fernet requires a 32-byte key encoded as **standard** base64 (RFC 4648 sec. 4),
|
|
3646
|
+
* which produces exactly 44 characters (including `=` padding).
|
|
3647
|
+
* We use `toString("base64")` (not `base64url`) so the padding is correct
|
|
3648
|
+
* and the key is accepted by Fernet implementations without modification.
|
|
3649
|
+
*/
|
|
3642
3650
|
declare function generateFernetKey(): string;
|
|
3643
3651
|
declare function generateSecret(length?: number): string;
|
|
3644
3652
|
declare function loadEnvFile(path: string): void;
|
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ INTERNAL_WORKER_TOKEN={{INTERNAL_WORKER_TOKEN}}
|
|
|
39
39
|
# MAX_QUEUE_DEPTH=1000
|
|
40
40
|
`;
|
|
41
41
|
function generateFernetKey() {
|
|
42
|
-
return randomBytes(32).toString("
|
|
42
|
+
return randomBytes(32).toString("base64");
|
|
43
43
|
}
|
|
44
44
|
function generateSecret(length = 32) {
|
|
45
45
|
return randomBytes(length).toString("hex");
|