const hashedCode = await bcrypt.hash(code, 10);
const raw = JSON.stringify( ...newPassword, password: form.mastercode + 'V@u|t!y' + form.password, user: User?.user?.id );
const secretSalt = process.env.SECRET_SALT; // Extra security layer
// we cant disclose key and iv for security reason but they are formed using the mastercode
const cipher = crypto.createCipheriv(algorithm, key, iv);
let encrypted = cipher.update(body.password, "utf8", "hex");
encrypted += cipher.final("hex");
//We are sorry we cant disclose key and iv for security reason but they are formed using the mastercode
const decipher = crypto.createDecipheriv(algorithm, storedKey, providedIv);
let decrypted = decipher.update(element.password, "hex", "utf8");
decrypted += decipher.final("utf8");
return ...element, password: decrypted ;
Wanna Contribute Us, We Will Be So Thankful From Your Contributions