@beenotung/tslib
Version:
utils library in Typescript
20 lines (19 loc) • 622 B
TypeScript
/** works in browser and node.js (using crypto.subtle) */
export declare function hashAsync(message: string | BufferSource, options?: {
algorithm?: {
name: string;
} | string;
outputFormat: 'hex';
}): Promise<string>;
export declare function hashAsync(message: string | BufferSource, options?: {
algorithm?: {
name: string;
} | string;
outputFormat: 'ArrayBuffer';
}): Promise<ArrayBuffer>;
export declare function hashAsync(message: string | BufferSource, options?: {
algorithm?: {
name: string;
} | string;
outputFormat: 'Uint8Array';
}): Promise<Uint8Array>;