UNPKG

1.88 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/md5`
3
4# Summary
5This package contains type definitions for md5 (https://github.com/pvorb/node-md5).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/md5.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/md5/index.d.ts)
10````ts
11// Type definitions for md5 2.3
12// Project: https://github.com/pvorb/node-md5
13// Definitions by: Bill Sourour <https://github.com/arcdev1>
14// Cameron Crothers <https://github.com/jprogrammer>
15// Piotr Błażejewicz <https://github.com/peterblazejewicz>
16// Ruslan Arkhipau <https://github.com/DethAriel>
17// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
18
19/**
20 * Calculate the MD5 hash of a message.
21 *
22 * @param message - Message to hash.
23 * @param options - Input and output options.
24 * @returns MD5 hash.
25 */
26declare function md5(message: string | number[] | Uint8Array, options: md5.Options & { asBytes: true }): number[];
27declare function md5(message: string | number[] | Uint8Array, options?: Pick<md5.Options, 'asString' | 'encoding'>): string;
28declare function md5(message: string | number[] | Uint8Array, options?: md5.Options): string | number[];
29
30declare namespace md5 {
31 interface Options {
32 asBytes?: boolean | undefined;
33 asString?: boolean | undefined;
34 encoding?: 'binary' | string | undefined;
35 }
36}
37
38export = md5;
39
40````
41
42### Additional Details
43 * Last updated: Tue, 08 Feb 2022 12:01:31 GMT
44 * Dependencies: none
45 * Global values: none
46
47# Credits
48These definitions were written by [Bill Sourour](https://github.com/arcdev1), [Cameron Crothers](https://github.com/jprogrammer), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Ruslan Arkhipau](https://github.com/DethAriel).
49
\No newline at end of file