>> byte[] plaintext = Cipher.pad(str.getBytes(), encAlg.getBlockSize()); <<
I noticed the str.getBytes() returns a different value based on whether you are using JSE1.22 v.s. JSE1.3.1. If the byte array is wrong at that point then maybe it screws up the rest of process.
