Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

269
Views
How to generate an MD5 password string hash in JavaScript or Node.js?

I need to write a function to generate an md5 hash for a password on a site page. Help write the md5 function?

For example:

function handleEvent() {
   var md5 = generateMD5(document.getElementById("password").value);
   console.log(md5);
}

function generateMD5(string) {
   // generate md5 hash here
}
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You can use the already written md5 generation function: GitHub (npm, Demo)

Using script tag:

<script src="https://cdn.jsdelivr.net/npm/md5-js-tools@1.0.2/lib/md5.min.js"></script>
<script>
   var hash = MD5.generate("Example string");
   console.log(hash);
</script>

With ES5:

import { MD5 } from "md5-js-tools";
var hash = MD5.generate("Example string");
console.log(hash);

or

const { MD5 } = require("md5-js-tools");
var hash = MD5.generate("Example string");
console.log(hash);
about 4 years ago · Juan Pablo Isaza Report

0

<script type="text/javascript" src="md5.min.js"></script>
<script>
window.addEventListener('load', function() {
    var strHash = md5('tutsplus');
    alert('The MD5 hash of the tutsplus string is:' + strHash);
});
</script>

Ref: For more details follow the link

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!