Files
appServerPortalUI/auth/cretePassword.js
2026-03-22 22:06:35 +01:00

13 lines
394 B
JavaScript
Executable File

import bcrypt from "bcrypt";
const password = process.argv[2];
bcrypt.hash(password, 12).then(hash=>{
console.log(hash);
});
// node createPassword.js "geheim"
//docker exec AppServerAuth node -e "import bcrypt from 'bcrypt'; bcrypt.hash('abc', 12).then(h => console.log(h));"
// node cretePassword.js "geheim"
// $2b$12$Ld/e3h0ogkc1ELnAse9.dueckrJkUQXrvjy1mKKwCV5I61aS8Ge4G