public static String hashString(String input) {
		try {
			byte[] inputBytes = input.getBytes("UTF-8");

			MessageDigest md = MessageDigest.getInstance("MD5");
			byte[] digest = md.digest(inputBytes);

			StringBuilder hexString = new StringBuilder();
			for(int i = 0; i < digest.length; i++) {
				String hex = Integer.toHexString(0xFF & digest[i]);
				if (hex.length() == 1) 
				    hexString.append('0');
				
				hexString.append(hex);
			}
			
			return hexString.toString().toLowerCase();
			
		}catch(Exception e) {
			e.printStackTrace();
		}
		
		return "";
	}