code: public String encrypt(String key, String initializationVector, String message) {
  		try {
  			IvParameterSpec initializationVectorSpec = new IvParameterSpec(Base64.decodeBase64(initializationVector));
  			final SecretKeySpec keySpec = new SecretKeySpec(Base64.decodeBase64(key), keyAlgorithm);
  			final Cipher cipher = (((provider == null) || (provider.length() == 0))
  					? Cipher.getInstance(cipherAlgorithm)
  					: Cipher.getInstance(cipherAlgorithm, provider));
  			byte[] messageAsByteArray;
  
  			switch (mode) {
  				case ENCRYPT:
  					cipher.init(Cipher.ENCRYPT_MODE, keySpec, initializationVectorSpec);
  					messageAsByteArray = message.getBytes(charsetName);
  					final byte[] encryptedMessage = cipher.doFinal(messageAsByteArray);
  					return new String(Base64.encodeBase64(encryptedMessage, chunkOutput));
  				case DECRYPT:
  					cipher.init(Cipher.DECRYPT_MODE, keySpec, initializationVectorSpec);
  					messageAsByteArray = Base64.decodeBase64(message);
  					final byte[] decryptedMessage = cipher.doFinal(messageAsByteArray);
  					return new String(decryptedMessage, charsetName);
  				default:
  					return null;
  			}
  		} catch (Exception e) {
  			throw new SymmetricEncryptionException("error encrypting/decrypting message; mode=" + mode, e);
  		}
  	}
docs: Encrypts or decrypts a message. The encryption/decryption mode depends on
  the configuration of the mode parameter.
  
  @param key a base64 encoded version of the symmetric key
  @param initializationVector a base64 encoded version of the
  initialization vector
  @param message if in encryption mode, the clear-text message to encrypt,
  otherwise a base64 encoded version of the message to decrypt
  @return if in encryption mode, returns a base64 encoded version of the
  encrypted message, otherwise returns the decrypted clear-text
  message
  @throws SymmetricEncryptionException on runtime errors
  @see #setMode(com.google.code.springcryptoutils.core.cipher.Mode)