Browse Source
Use cryptographically secure session token
insight-spv
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
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]}`; |
|
|
|
} |
|
|
|
} |
|
|
|