Android decryption: Error while finalizing cipher
I am using Android to encrypt and encrypt images sent between apps. The encryption works well but when the file arrives at the destination it will not decrypt. Now I have copied the file at the destination app and decrypted it successfully using 3rd-party software. The error I get is:"Error while finalizing cipher" at CipherInputStream (CipherInputStream.java:107) caused by IllegalBlockSizeException. The encryption & decryption code is below: public static String encrypt(String plainFile, String encryptedFile) throws IOException, NoSuchAlgorithmException, NoSuchPaddingException,