I'm using "FBEncryptorAES" library for encryption in Obj-C iOS
The encrypted data from a string and the decrypted data vales are perfect.
But when I try to decrypt using the following online tool:
http://aesencryption.net/ ,the encryption and decryption do not match.
And the response from the backend server is success while using Android but in iOS response is failure.
Can anyone suggest some library for iOS that work exactly as the Android code is working and encrypting data.
Android Code:
public static String encrypt(String input, String key) {
try {
SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec);
return new String(Base64.encode(cipher.doFinal(input.getBytes()),Base64.DEFAULT));
} catch (Exception e) {
}
return null;
}