44c40efecf
* refactor: migrate from asar to @electron/asar * fix: update asar require calls
9 lines
314 B
JavaScript
9 lines
314 B
JavaScript
const asar = require('@electron/asar');
|
|
const crypto = require('crypto');
|
|
const fs = require('fs');
|
|
|
|
const archive = process.argv[2];
|
|
const hashFile = process.argv[3];
|
|
|
|
const { headerString } = asar.getRawHeader(archive);
|
|
fs.writeFileSync(hashFile, crypto.createHash('SHA256').update(headerString).digest('hex'));
|