WebSocket server + Search index + indexable content parser

This commit is contained in:
NGPixel
2016-09-05 00:39:59 -04:00
parent 528fab6c87
commit 7945d024ad
30 changed files with 488 additions and 107 deletions

32
lib/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;
}
};