Made the encryption key changable via the settings.json
This commit is contained in:
parent
1981ab9e7c
commit
e8989daa66
|
@ -22,6 +22,7 @@ module.exports = function () {
|
|||
'torHost' : 'example.com',
|
||||
'torPort' : 9050,
|
||||
'amountOfHours' : 7,
|
||||
'encryptionKey': 'JMU6DAQpzt32hJ2WndJxFvk3WHWqFcscq9yMMYkr8kgTtsam',
|
||||
'times' : [
|
||||
'8:45 - 9:45',
|
||||
'9:45 - 10:45',
|
||||
|
|
5
crypt.js
5
crypt.js
|
@ -8,11 +8,14 @@
|
|||
//Import first-party modules.
|
||||
var crypto = require('crypto');
|
||||
|
||||
//Import self-written modules.
|
||||
var config = require('./configuration');
|
||||
|
||||
//Set local variables.
|
||||
var encoding = 'utf8';
|
||||
var cryptEncoding = 'hex';
|
||||
var algo = 'aes192';
|
||||
var passwd = 'JMU6DAQpzt32hJ2WndJxFvk3WHWqFcscq9yMMYkr8kgTtsam';
|
||||
var passwd = config().encryptionKey;
|
||||
|
||||
/**
|
||||
* Function for encrypting a string.
|
||||
|
|
Loading…
Reference in a new issue