@drawbridge/drawbridge-utils 0.0.9 → 0.0.10

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/README.md CHANGED
@@ -33,7 +33,7 @@ Exports:
33
33
  const { encrypt, decrypt } = require( '@drawbridge/drawbridge-utils/encrypt' );
34
34
  ```
35
35
 
36
- Server-only because it uses Node `crypto` and reads `process.env.ENCRYPTION_KEY`. Exposed as a sub-export so client bundles don't pull Node built-ins.
36
+ Server-only because it uses Node `crypto` and reads `process.env.ENCRYPT_CONNECTION_SECRET`. Exposed as a sub-export so client bundles don't pull Node built-ins.
37
37
 
38
38
  ## Build & publish
39
39
 
package/dist/encrypt.cjs CHANGED
@@ -35,7 +35,7 @@ __export(encrypt_exports, {
35
35
  module.exports = __toCommonJS(encrypt_exports);
36
36
  var import_crypto = __toESM(require("crypto"), 1);
37
37
  var ALGORITHM = "aes-256-gcm";
38
- var getKey = () => Buffer.from(process.env.ENCRYPTION_KEY, "hex");
38
+ var getKey = () => Buffer.from(process.env.ENCRYPT_CONNECTION_SECRET, "hex");
39
39
  var encrypt = (value) => {
40
40
  const iv = import_crypto.default.randomBytes(12);
41
41
  const cipher = import_crypto.default.createCipheriv(ALGORITHM, getKey(), iv);
@@ -2,7 +2,7 @@ import crypto from 'crypto';
2
2
 
3
3
  const ALGORITHM = 'aes-256-gcm';
4
4
 
5
- const getKey = () => Buffer.from( process.env.ENCRYPTION_KEY, 'hex' );
5
+ const getKey = () => Buffer.from( process.env.ENCRYPT_CONNECTION_SECRET, 'hex' );
6
6
 
7
7
  const encrypt = ( value ) => {
8
8
 
package/dist/encrypt.d.ts CHANGED
@@ -2,7 +2,7 @@ import crypto from 'crypto';
2
2
 
3
3
  const ALGORITHM = 'aes-256-gcm';
4
4
 
5
- const getKey = () => Buffer.from( process.env.ENCRYPTION_KEY, 'hex' );
5
+ const getKey = () => Buffer.from( process.env.ENCRYPT_CONNECTION_SECRET, 'hex' );
6
6
 
7
7
  const encrypt = ( value ) => {
8
8
 
package/dist/encrypt.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // encrypt.js
2
2
  import crypto from "crypto";
3
3
  var ALGORITHM = "aes-256-gcm";
4
- var getKey = () => Buffer.from(process.env.ENCRYPTION_KEY, "hex");
4
+ var getKey = () => Buffer.from(process.env.ENCRYPT_CONNECTION_SECRET, "hex");
5
5
  var encrypt = (value) => {
6
6
  const iv = crypto.randomBytes(12);
7
7
  const cipher = crypto.createCipheriv(ALGORITHM, getKey(), iv);
package/package.json CHANGED
@@ -53,5 +53,5 @@
53
53
  "build": "tsup && npm publish"
54
54
  },
55
55
  "types": "dist/index.d.ts",
56
- "version": "0.0.9"
56
+ "version": "0.0.10"
57
57
  }