var JAVA = require("java");
const path = require("path");

let username = "zhouyang";
let password = "123456";
let salt = "G2UOdzQa";

async function main() {
  let java = await JAVA();
  java.classpath.push(path.resolve(__dirname));

  var realHexPassword = java.callStaticMethodSync(
    "PasswordUtil",
    "encrypt",
    username,
    password,
    salt
  );
  console.log(realHexPassword);
}
main();
