code: public String encrypt(String message) {
  		try {
  			final Cipher cipher = (((provider == null) || (provider.length() == 0))
  					? Cipher.getInstance(cipherAlgorithm)
  					: Cipher.getInstance(cipherAlgorithm, provider));
  			switch (mode) {
  				case ENCRYPT:
  					cipher.init(Cipher.ENCRYPT_MODE, keySpec, initializationVectorSpec);
  					byte[] encryptedMessage = cipher.doFinal(message.getBytes(charsetName));
  					return new String(Base64.encodeBase64(encryptedMessage, chunkOutput));
  				case DECRYPT:
  					cipher.init(Cipher.DECRYPT_MODE, keySpec, initializationVectorSpec);
  					byte[] decodedMessage = Base64.decodeBase64(message);
  					return new String(cipher.doFinal(decodedMessage), charsetName);
  				default:
  					return null;
  			}
  		} catch (Exception e) {
  			throw new SymmetricEncryptionException("error encrypting/decrypting message; mode=" + mode, e);
  		}
  	}
docs: Encrypts/decrypts a message using the underlying symmetric key and mode.
  
  @param message if in encryption mode, the clear-text message to encrypt,
  otherwise a base64 encoded version of the raw byte array
  containing the message to decrypt
  @return if in encryption mode, returns a base64 encoded version of the
  encrypted message, otherwise returns the clear-text message
  @throws SymmetricEncryptionException on runtime errors
  @see #setMode(Mode)