passwordDialog

fnstring passwordDialog(string message, string defaultValue = null)

Shows a password input dialog.

The input is masked with dots/asterisks for security.

Parameters

messageThe prompt message
defaultValueDefault input value (optional)

Returns

The entered password, or null if cancelled

Example:

string password = passwordDialog("Enter password:");
if (password !is null) {
    authenticate(password);
}