Skip to content

Commit 6d20dac

Browse files
committed
renaming variable to avoid shadow
1 parent af86c7e commit 6d20dac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/middleware/auth.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const crypto = require('crypto')
22

3-
const password = process.env.JWT_SECRET
3+
const secret = process.env.JWT_SECRET
44
const algorithm = 'aes-192-cbc'
55
// Key length is dependent on the algorithm. In this case for aes192, it is
66
// 24 bytes (192 bits).
7-
const key = crypto.scryptSync(password, 'salt', 24)
7+
const key = crypto.scryptSync(secret, 'salt', 24)
88
const iv = Buffer.alloc(16, 0) // Initialization crypto vector
99

1010
module.exports = {

0 commit comments

Comments
 (0)