blake3
Version:
BLAKE3 hashing for JavaScript: native Node bindings (where available) and WebAssembly
15 lines (14 loc) • 587 B
TypeScript
/// <reference types="node" />
import { BaseHashInput, IBaseHashOptions } from '../base/hash-fn';
/**
* Input used for node-based hashes.
*/
export declare type HashInput = BaseHashInput | string;
/**
* @hidden
*/
export declare const normalizeInput: (input: HashInput, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | undefined) => Uint8Array;
/**
* Returns a blake3 hash of the input, returning the binary hash data.
*/
export declare function hash(input: HashInput, { length }?: IBaseHashOptions): Buffer | string;