code: public byte[] encrypt(byte[] message, byte[] aad, byte[] iv) throws GeneralSecurityException {
  		Cipher cipher = getCipher(true);
  		if(iv == null && generateIV && ivLength > 0) {
  			iv = generateIV();
  		}
  		if(iv != null) {
  			cipher.init(Cipher.ENCRYPT_MODE, getKey(), getAlgorithmParameterSpec(iv));
  		} else {
  			cipher.init(Cipher.ENCRYPT_MODE, getKey());
  			iv = cipher.getIV();
  		}
  		ivThreadLocal.set(iv);
  		if(aad != null) {
  			cipher.updateAAD(aad);
  		}
  		byte[] encrypted;
  		if(prependIV && iv != null) {
  			int outputSize = cipher.getOutputSize(message.length);
  			encrypted = new byte[iv.length + outputSize];
  			System.arraycopy(iv, 0, encrypted, 0, iv.length);
  			try {
  				int nBytes = cipher.doFinal(message, 0, message.length, encrypted, iv.length);
  				if(nBytes < outputSize) {
  					int excessBytes = outputSize - nBytes;
  					byte[] resized = new byte[encrypted.length - excessBytes];
  					System.arraycopy(encrypted, 0, resized, 0, resized.length);
  					encrypted = resized;
  				}
  			} catch (ShortBufferException e) {
  				throw new RuntimeException(e);
  			}
  		} else {
  			encrypted = cipher.doFinal(message);
  		}
  		return encrypted;
  	}
docs: <p>Encrypts a byte array and returns the encrypted message.</p>
  @param message
  @param aad
  @param iv
  @return
  @throws GeneralSecurityException