implementing AES256 encryption into IOS
问题 This is my java code. Now I want to implement same functionality in Objective-C. Cipher encryptCipher; IvParameterSpec iv = new IvParameterSpec(key); SecretKeySpec skeySpec = new SecretKeySpec(key, "AES"); encryptCipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); encryptCipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv); byte[] encrypted = encryptCipher.doFinal(dataToEncrypt.getBytes()); Log.d("TAG", "encrypted string:" + Base64.encodeToString(encrypted, Base64.DEFAULT)); return Base64