Code example for UndeclaredThrowableException

0
			hmacSha1.init(macKey);
			 
			return hmacSha1.doFinal(counter);
			 
		}catch(GeneralSecurityException ex){
			throw new UndeclaredThrowableException(ex);
		} 
	} 
	 
	/** 
	 * Generates a new seed value for a token 
	 * the returned string will contain a randomly generated 
	 * hex value 
	 * @param length - defines the length of the new seed this should be either 128 or 160 
	 * @return 
	 */ 
	public static String generateNewSeed(int length){
		 
		String salt = "";
		long ticks = Calendar.getInstance(TimeZone.getTimeZone("GMT")).getTimeInMillis();		
		salt = salt + ticks;