add/install the mysql module
npm install crypto-js
#OR
yarn add crypto-js
Usage
// import the module crypto-Js
const cryptoJs = require("crypto-js")
// use the encryption method to encrypt the password
const encrypted = cryptoJs.SHA256(password)