add env LEGACY_CRYPTO

This commit is contained in:
Dave Horton
2021-11-29 09:02:28 -05:00
parent f1d7dcc6d2
commit 19a55a5774
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
const crypto = require('crypto');
const algorithm = 'aes-256-cbc';
const algorithm = process.env.LEGACY_CRYPTO ? 'aes-256-ctr' : 'aes-256-cbc';
const iv = crypto.randomBytes(16);
const secretKey = crypto.createHash('sha256')
.update(String(process.env.JWT_SECRET))
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "jambonz-api-server",
"version": "0.6.7-rc5",
"version": "v0.6.7-rc8",
"description": "",
"main": "app.js",
"scripts": {