package org.yacos.web.system.session;

public class YACOSUtils {
	private static String VALID_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!?%$()";
	
	public static String generate(Integer length){
		String password = new String();
		
		for(int i=0;i<length;i++){
			password += VALID_CHARS.charAt((int)(Math.random()*((double)VALID_CHARS.length())));
		}
		
		return password;
	}
}
