mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Base64 encoding of meshid/nodeid in the database.
This commit is contained in:
parent
1952d75860
commit
ace4046415
7 changed files with 47 additions and 68 deletions
|
@ -4,15 +4,6 @@
|
|||
* @version v0.0.1
|
||||
*/
|
||||
|
||||
// Construct a MeshRelay object, called upon connection
|
||||
module.exports.CreateMeshRelayKey = function (parent, func) {
|
||||
parent.crypto.randomBytes(48, function (err, buf) {
|
||||
var key = buf.toString('hex').toUpperCase() + ':' + Date.now();
|
||||
key += ':' + parent.crypto.createHmac('SHA384', parent.relayRandom).update(key).digest('hex');
|
||||
func(key);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.CreateMeshRelay = function (parent, ws, req) {
|
||||
var obj = {};
|
||||
obj.ws = ws;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue