Browse Source

Use cryptographically secure session token

insight-spv
Luke Childs 7 years ago
committed by GitHub
parent
commit
b67c572b06
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      main.js

5
main.js

@ -7,6 +7,7 @@ const BrowserWindow = electron.BrowserWindow;
const path = require('path');
const url = require('url');
const os = require('os');
const { randomBytes } = require('crypto');
const md5 = require('./routes/md5');
const exec = require('child_process').exec;
const { Menu } = require('electron');
@ -54,7 +55,7 @@ app.setVersion(appBasicInfo.version);
shepherd.createAgamaDirs();
const appSessionHash = md5(Date.now().toString());
const appSessionHash = randomBytes(32).toString('hex');
const _spvFees = shepherd.getSpvFees();
shepherd.writeLog(`app info: ${appBasicInfo.name} ${appBasicInfo.version}`);
@ -485,4 +486,4 @@ function formatBytes(bytes, decimals) {
const i = Math.floor(Math.log(bytes) / Math.log(k));
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
}
}

Loading…
Cancel
Save