Arrays.fill(newPassword2, ' ');
} while (noMatch);
}
protected void displayWarning(boolean persisting) {
Console c = System.console();
if (c == null) {
System.err.println("No console.");
System.exit(1);
}
if (persisting) {
c.printf("***************************************************************************************************\n");
c.printf("You have indicated that you would like to persist the master secret for this service instance.\n");
c.printf("Be aware that this is less secure than manually entering the secret on startup.\n");
c.printf("The persisted file will be encrypted and primarily protected through OS permissions.\n");
c.printf("***************************************************************************************************\n");
}
else {
c.printf("***************************************************************************************************\n");
c.printf("Be aware that you will need to enter your master secret for future starts exactly as you do here.\n");
c.printf("This secret is needed to access protected resources for the service process.\n");
c.printf("The master secret must be protected, kept secret and not stored in clear text anywhere.\n");
c.printf("***************************************************************************************************\n");
}
}