diff options
Diffstat (limited to 'client.js')
-rwxr-xr-x | client.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -235,9 +235,11 @@ function registerUser(userid,password){ process.stdout.write("Username? "); userid=kbd.getLineSync().replace(/[^a-zA-Z0-9_-]/g,""); process.stdout.write("Password? "); +var hasher=crypto.createHash("sha512"); kbd.setEcho(false); -password=kbd.getLineSync(); +hasher.update(kbd.getLineSync()); kbd.setEcho(true); +password=hasher.digest("hex"); console.log("\nChecking existence..."); userExists(userid,function(exists){ |