One line javascript function to create MD5 hash using Node.js
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
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login .