code: public static OutputStream encrypt(OutputStream outputStream, byte[] key, byte[] iv) {
          checkNotNull(outputStream);
          checkNotNull(key);
          checkNotNull(iv);
          checkArgument(key.length == iv.length);
          AESFastEngine aesEngine = new AESFastEngine();
          PaddedBufferedBlockCipher cipher =
                  new PaddedBufferedBlockCipher(new CBCBlockCipher(aesEngine), new PKCS7Padding());
          cipher.init(true, new ParametersWithIV(new KeyParameter(key), iv));
          return new CipherOutputStream(outputStream, cipher);
      }
docs: AES/CBC/PKCS5Padding Encryption
  
  @param outputStream output stream to be encrypted
  @param key          valid AES key sizes are 128, 192, or 256 bits (16, 24, or 32 bytes).
  @param iv           AES initialization vector. Must be the same size as the key.
  @return encrypted output stream