How to encrypt in Java and decrypt in Android and iOS
问题 I have a Linux server running a Java-jar file that encrypts several files. The Android and iPhone App download that file and shall decrypt it. What algorithm I have to use to do so? I recognized that the algorithms I used in Java do not work in Android. What I did in Java was: private static byte[] encrypt(byte[] raw, byte[] clear) throws Exception { SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.ENCRYPT_MODE, skeySpec);