@electron/universal
Version:
Utility for creating Universal macOS applications from two x64 and arm64 Electron applications
12 lines • 400 B
JavaScript
import fs from 'node:fs';
import crypto from 'node:crypto';
import { pipeline } from 'node:stream/promises';
import { d } from './debug.js';
export const sha = async (filePath) => {
d('hashing', filePath);
const hash = crypto.createHash('sha256');
hash.setEncoding('hex');
await pipeline(fs.createReadStream(filePath), hash);
return hash.read();
};
//# sourceMappingURL=sha.js.map