code: public static Cipher newCipher(final int operationMode, final SecretKey key,
  		final AlgorithmParameterSpec paramSpec, final String algorithm)
  		throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException,
  		InvalidAlgorithmParameterException
  	{
  		final Cipher cipher = newCipher(algorithm);
  		cipher.init(operationMode, key, paramSpec);
  		return cipher;
  	}
docs: Factory method for creating a new {@link Cipher} from the given parameters.
  
  @param operationMode
  the operation mode
  @param key
  the key
  @param paramSpec
  the param spec
  @param algorithm
  the algorithm
  @return the new {@link Cipher}
  
  @throws NoSuchAlgorithmException
  is thrown if instantiation of the SecretKeyFactory object fails.
  @throws NoSuchPaddingException
  is thrown if instantiation of the cypher object fails.
  @throws InvalidKeyException
  is thrown if initialization of the cypher object fails.
  @throws InvalidAlgorithmParameterException
  is thrown if initialization of the cypher object fails.