Merged main & websocket server, refactored libs, image uploads fixes

This commit is contained in:
NGPixel
2016-10-16 01:34:34 -04:00
parent 6ea243e8d4
commit 91d524eb06
29 changed files with 350 additions and 3985 deletions

32
libs/internalAuth.js Normal file
View File

@@ -0,0 +1,32 @@
"use strict";
const crypto = require('crypto');
/**
* Internal Authentication
*/
module.exports = {
_curKey: false,
init(inKey) {
this._curKey = inKey;
return this;
},
generateKey() {
return crypto.randomBytes(20).toString('hex')
},
validateKey(inKey) {
return inKey === this._curKey;
}
};