@selvajs/cli 2.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/src/secrets.js ADDED
@@ -0,0 +1,7 @@
1
+ import { randomBytes } from 'node:crypto';
2
+
3
+ // 32 bytes hex = 64-character string. Matches the runtime's expectation
4
+ // (HMAC-SHA256 key + AES-256-GCM key, both 32 bytes).
5
+ export function generateKey() {
6
+ return randomBytes(32).toString('hex');
7
+ }