可以使用Java中的replaceAll()方法来去除AES加密字符串中的\r和\n。具体代码如下: ``` String encryptedString = "encrypted string with \r and \n"; String decryptedString = AES.decrypt(encryptedString, key); // Remove \r and \n from decrypted string decryptedString = decryptedString.replaceAll("\r|\n", ""); System.out.println(decryptedString); ``` 在上面的代码中,我们首先使用AES解密加密字符串,然后使用replaceAll()方法将字符串中的\r和\n替换为空字符串。最后,我们打印出去除\r和\n后的字符串。