Skip to content

Commit 9bae1bd

Browse files
committed
default values for enc keys
1 parent 8ca347b commit 9bae1bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/server/util/util.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ export const generateTerms = () => {
9191
}
9292

9393
// eslint-disable-next-line prefer-destructuring
94-
const ENCRYPTION_IV = process.env.ENCRYPTION_IV
94+
const ENCRYPTION_IV = process.env.ENCRYPTION_IV || 'default'
95+
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY || 'default'
9596

9697
const algorithm = 'aes-256-cbc'
97-
const key = new Uint8Array(Buffer.from(process.env.ENCRYPTION_KEY, 'hex'))
98+
const key = new Uint8Array(Buffer.from(ENCRYPTION_KEY, 'hex'))
9899
const iv = new Uint8Array(Buffer.from(ENCRYPTION_IV, 'hex'))
99100

100101
export function encrypt(text) {

0 commit comments

Comments
 (0)