public abstract class AbstractPasswordPrompter extends Object implements PasswordPrompter
| Constructor and Description |
|---|
AbstractPasswordPrompter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
passwordsMatch(char[] password1,
char[] password2)
Checks whether the two passwords match.
|
char[] |
promptForValidPassword(int minLength,
int maxLength,
String promptMessage,
String promptConfirmMessage,
String lengthError,
String matchError,
OutputDevice device)
Prompts for a valid password by asking for the password using
PasswordPrompter.readPassword(String, Object...), checking
its length against the constraints, asking for the password to be confirmed, and checking to make sure the
passwords match. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpromptForValidPassword, readPassword, readPasswordpublic boolean passwordsMatch(char[] password1,
char[] password2)
passwordsMatch in interface PasswordPrompterpassword1 - The entered passwordpassword2 - The confirmed passwordtrue if the passwords match, false otherwise.public char[] promptForValidPassword(int minLength,
int maxLength,
String promptMessage,
String promptConfirmMessage,
String lengthError,
String matchError,
OutputDevice device)
throws IOError
PasswordPrompter.readPassword(String, Object...), checking
its length against the constraints, asking for the password to be confirmed, and checking to make sure the
passwords match.promptForValidPassword in interface PasswordPrompterminLength - The minimum legal length for the passwordmaxLength - The maximum legal length for the passwordpromptMessage - The message to prompt for the password initially (the message should not include format specifiers)promptConfirmMessage - The message to prompt to confirm the password (the message should not include format specifiers)lengthError - The message to display if the password does not meet the minimum or maximum length requirements (the message should not include format specifiers)matchError - The message to display if the two entered passwords do not match (the message should not include format specifiers)device - The device that should be used to output messages and errorsIOError - if an I/O error occurs.Copyright © 2010-2013 NWTS Java Code. All Rights Reserved. Licensed Under the Apache License version 2.0.