package de.hsadmin.core.util;

import java.util.Random;

import de.rrze.jpwgen.flags.PwGeneratorFlagBuilder;
import de.rrze.jpwgen.impl.PwGenerator;

public class PasswordTool {

	public static PwGeneratorFlagBuilder flagBuilder = new PwGeneratorFlagBuilder();
	public static Random random = new Random();
	
	static {
		flagBuilder.setIncludeCapitals();
		flagBuilder.setIncludeNumerals();
//		flagBuilder.setIncludeReducedSymbols();
		flagBuilder.setFilterAmbiguous();
	}
	
	public static String generatePassword() {
		String password = PwGenerator.generatePassword(17, flagBuilder.build(), 100, random);
		return password;
	}

}
