Files
JiboViteDocs/node_modules/md5-hex/index.d.ts
Your Name 38652eb9b5 Initalize
2026-05-03 12:12:57 -04:00

20 lines
563 B
TypeScript

/**
Create a MD5 hash with hex encoding.
@param data - Prefer buffers as they're faster to hash, but strings can be useful for small things.
Pass an array instead of concatenating strings and/or buffers. The output is the same, but arrays do not incur the overhead of concatenation.
@example
```
import fs from 'node:fs';
import md5Hex from 'md5-hex';
const buffer = fs.readFileSync('unicorn.png');
md5Hex(buffer);
//=> '1abcb33beeb811dca15f0ac3e47b88d9'
```
*/
export default function md5Hex(data: Buffer | string | ReadonlyArray<Buffer | string>): string;