I want to make a website that takes plain text and hashing it into md5
hash, I don't know how websites implement those things, and how can I access this library ?
const md5 = require('crypto');
I want to make a website that takes plain text and hashing it into md5
hash, I don't know how websites implement those things, and how can I access this library ?
const md5 = require('crypto');
CryptoJS is a growing collection of standard and secure cryptographic algorithms implemented in JavaScript using best practices and patterns. They are fast, and they have a consistent and simple interface.
This is a way to call it without nodejs using the scripts, better to use the full cryptojs library.
var plaintext = "Hello World";
var encriptedtext = CryptoJS.MD5(plaintext)
document.getElementById("md5").innerHTML = encriptedtext
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js"></script>
<span id="md5">MD5: </span>
You need an Encoder to convert from encoding formats to WordArray objects and vica versa Example:
CryptoJS.enc.Utf8
Now it is valid to point out MD5 is kind outdated and not recomended to store passwords and it is better to use SHA please review this link: MD5 vs SHA