UNPKG

@devtion/actions

Version:
28 lines 1.11 kB
/// <reference types="node" /> import fs from "fs"; /** * Converts Uint8Array to hexadecimal string. * @param buffer arbritrary length of data * @returns hexadecimal string */ export declare const toHex: (buffer: Uint8Array) => string; /** * Get 512 bit blake hash of the contents of given path. * @param data buffer or hexadecimal string * @returns 64 byte hexadecimal string */ export declare const blake512FromPath: (path: fs.PathLike) => Promise<string>; /** * Return the SHA256 hash (HEX format) of a given value * @param value <string> - the value to be hashed. * @returns <string> - the HEX format of the SHA256 hash of the given value */ export declare const computeSHA256ToHex: (value: string) => string; /** * Helper function that can be used to compare whether two files' hashes are equal or not. * @param path1 <string> Path to the first file. * @param path2 <string> Path to the second file. * @returns <Promise<boolean>> Whether the files are equal or not. */ export declare const compareHashes: (path1: string, path2: string) => Promise<boolean>; //# sourceMappingURL=crypto.d.ts.map