UNPKG

655 BTypeScriptView Raw
1/// <reference types="node" />
2import { NodeIntegrity } from "./asar";
3export interface AsarIntegrityOptions {
4 readonly resourcesPath: string;
5 readonly resourcesRelativePath: string;
6}
7export interface HeaderHash {
8 algorithm: "SHA256";
9 hash: string;
10}
11export interface AsarIntegrity {
12 [key: string]: HeaderHash;
13}
14export declare function computeData({ resourcesPath, resourcesRelativePath }: AsarIntegrityOptions): Promise<AsarIntegrity>;
15export declare function hashFile(file: string, blockSize?: number): Promise<NodeIntegrity>;
16export declare function hashFileContents(contents: Buffer | string, blockSize?: number): NodeIntegrity;