public static byte[] doFinal(Cipher cipher, byte[] input) {
		try {
			return cipher.doFinal(input);
		}
		catch (IllegalBlockSizeException e) {
			throw new IllegalStateException(
					"Unable to invoke Cipher due to illegal block size", e);
		}
		catch (BadPaddingException e) {
			throw new IllegalStateException("Unable to invoke Cipher due to bad padding",
					e);
		}
	}