From the php encryption function below: the result of encryption is MyFTCJx8RPzOx7h8QNxEtQgeiNIRwnrJ+uc0V70= And I have try to write this function in Java like this: The result is amF2YXguY3J5cHRvLnNwZYUmrJNv8ycvLua0O9g= Why my java function return the different result from php? And how do I fix the java function to get the same result with php? Thank you. Answer The IV is determined