text: const crypto = require("crypto");
  
  module.exports = {
    checkPassword: (salt, sha256pwd, inputPwd) => {
      const pwd = convertToCrypto(inputPwd, salt);
      return sha256pwd === pwd;
    }
  };
  
  function convertToCrypto(str, salt) {
    return crypto.pbkdf2Sync(str, salt, 100000, 32, "sha256").toString("hex");
  }
  