final byte [ ] crypto ( final byte [ ] input , final int offset , final int len , final boolean decrypt ) throws InvalidKeyException , InvalidAlgorithmParameterException , IllegalBlockSizeException , BadPaddingException { aesCipher . init ( decrypt ? Cipher . DECRYPT_MODE : Cipher . ENCRYPT_MODE , aesKey , aesIV ) ; return aesCipher . doFinal ( input , offset , len ) ; }
Encrypt or Decrypt with AES