I am using the AES
encryption using the below code,
NSString *encryptedString = [AESCrypt encrypt:@"str" password:@"password"];
The same string is not decoded correctly in .net server. The code is being used in .net server is as below,
AesEncryption = new RijndaelManaged();
AesEncryption.KeySize = 256;
AesEncryption.BlockSize = 128;
AesEncryption.Mode = CipherMode.CBC;
AesEncryption.Padding = PaddingMode.PKCS7;
string keyStr = "cGFWDwzc3dvcmQAAAAAAwzc3==";
string ivStr = "aEdcGFzc3dvcmQwzc3AvcmQAAAAA==";
byte[] ivArr = Convert.FromBase64String(keyStr);
byte[] keyArr = Convert.FromBase64String(ivStr);
AesEncryption.IV = ivArr;
AesEncryption.Key = keyArr;
Can you please help me on this.