[Minor] looping in PasswordCreator
This commit is contained in:
parent
b8452dc6e4
commit
3905a38a32
|
@ -43,6 +43,8 @@ public class PasswordCreator {
|
|||
@SuppressWarnings("nls")
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
while (true) {
|
||||
|
||||
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
|
||||
|
||||
String hashAlgorithm = null;
|
||||
|
@ -66,11 +68,11 @@ public class PasswordCreator {
|
|||
|
||||
int iterations = -1;
|
||||
while (iterations == -1) {
|
||||
System.out.print("Hash iterations [200000]: ");
|
||||
System.out.print("Hash iterations [10000]: ");
|
||||
String readLine = r.readLine().trim();
|
||||
|
||||
if (readLine.isEmpty()) {
|
||||
iterations = 200000;
|
||||
iterations = 10000;
|
||||
} else {
|
||||
|
||||
try {
|
||||
|
@ -126,7 +128,9 @@ public class PasswordCreator {
|
|||
System.out.println("Salt is: " + saltS);
|
||||
System.out.println();
|
||||
|
||||
System.out.println(XmlConstants.XML_ATTR_PASSWORD + "=\"" + passwordHashS + "\" " + XmlConstants.XML_ATTR_SALT
|
||||
+ "=\"" + saltS + "\"");
|
||||
System.out.println(XmlConstants.XML_ATTR_PASSWORD + "=\"" + passwordHashS + "\" "
|
||||
+ XmlConstants.XML_ATTR_SALT + "=\"" + saltS + "\"");
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue