Skip to content

md5

md5(data?: string | Uint8Array<ArrayBufferLike>): HashObject

Defined in: packages/pythonlib/src/hashlib.ts:191

Create a new MD5 hash object. Note: MD5 is not available in Web Crypto API (browser).

Parameters

ParameterTypeDescription
data?string | Uint8Array<ArrayBufferLike>Optional initial data to hash

Returns

HashObject

An MD5 hash object

Example

const h = md5("hello")
console.log(await h.hexdigest()) // "5d41402abc4b2a76b9719d911017c592"