MD5 has is very useful to do checksum to verify data integrity. If you need a MD5 hash generator, here is the most simplest solution for creating md5 hash from string using Node.JS

One liner solution to create MD5 hash from string

const md5 = data => crypto.createHash('md5').update(data).digest("hex")

Usage of your MD5 hash function

const generateHash = md5('my string message')
console.log(generateHash)

output: cecffd712b90cc57a123be29226a9915