> Could you give me an example about how to encrypt file with AES in
> Java?
>
> something like:
> public static boolean encrypt(String key, File fileIn, File fileOut);
If you setup as:
Cipher aes = Cipher.getInstance("AES");
aes.init(mode, new SecretKeySpec(key.getBytes("UTF-8"), "AES"));
then you can encrypt with:
b2 = aes.update(b, 0, n);
and:
b2 = aes.doFinal(b, 0, n);
Arne