public static String getRandomPassword(int length) {
		final int maxLength = 50;
		final int maxNum = 36;
		Date md = new Date();
		char[] str = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
				'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
				'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
		if (length > maxLength) {
			return null;
		}
		int count;
		Random r = new Random(md.getTime());
		StringBuffer password = new StringBuffer();
		for (count = 0; count < length; count++)
			password.append(str[Math.abs(r.nextInt(maxNum))]);
		return password.toString();
	}