/** * Creates a random password of the specified length, if length <=0, return <code>null</code> */ public char[] getRandomPassword(int length) { if (length <= 0) return null; char[] buff = new char[length]; getRandomPassword(buff); return buff; }
public char[] getRandomPasswordWithDefaultLength() { char[] buff = new char[DefaultPasswordLength]; getRandomPassword(buff); return buff; }
/** * Scrambles a char array overwriting all characters with random characters, used for scrambling * plain text passwords after usage to avoid keeping them around in memory. */ public static void scramble(char[] ch) { if (ch == null) return; RandomPasswordProvider rpp = new RandomPasswordProvider(); rpp.getRandomPassword(ch); }
/** * Scrambles a byte array overwriting all characters with random characters, used for scrambling * plain text passwords after usage to avoid keeping them around in memory. */ public static void scramble(byte[] ch) { if (ch == null) return; RandomPasswordProvider rpp = new RandomPasswordProvider(); rpp.getRandomPassword(ch); } /** Builds the write query based on the access limits class */
} else { message = "The generated master password is: "; masterPasswordArray = getRandomPassworddProvider().getRandomPassword(8); writeMasterPasswordInfo(info, message, masterPasswordArray);
keyStoreProvider.reloadKeyStore(); keyStoreProvider.setUserGroupKey( XMLUserGroupService.DEFAULT_NAME, randomPasswdProvider.getRandomPassword(32)); keyStoreProvider.storeKeyStore();