code: public static byte[] encrypt(byte[] data, byte[] key) throws InvalidCipherTextException {
          checkNotNull(data);
          checkNotNull(key);
          AESFastEngine aesEngine = new AESFastEngine();
          PaddedBufferedBlockCipher cipher =
                  new PaddedBufferedBlockCipher(aesEngine, new PKCS7Padding());
          cipher.init(true, new KeyParameter(key));
          byte[] outBuf = new byte[cipher.getOutputSize(data.length)];
          int l1 = cipher.processBytes(data, 0, data.length, outBuf, 0);
          int l2 = cipher.doFinal(outBuf, l1);
          byte[] result;
          if (outBuf.length != l1 + l2) {
              result = new byte[l1 + l2];
              System.arraycopy(outBuf, 0, result, 0, result.length);
          } else
              result = outBuf;
          return result;
      }
docs: AES/ECB/PKCS5Padding Encryption
  
  @param data data to encrypt
  @param key  valid AES key sizes are 128, 192, or 256 bits (16, 24, or 32 bytes).
  @return bytes encrypted
  @throws InvalidCipherTextException thrown if padding is expected and not found