Made the encryption key changable via the settings.json

This commit is contained in:
Bram van der Veen 2015-08-31 08:32:21 +02:00
parent 1981ab9e7c
commit e8989daa66
2 changed files with 5 additions and 1 deletions

View file

@ -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',

View file

@ -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.