title: AES256 from iOS to PHP
body: <p>I'm trying to decrypt it in Xcode with <a href="https://github.com/Gurpartap/AESCrypt-ObjC" rel="nofollow">AES-Crypt-Objc</a>. I'have tried really everything..different libariers and so on..</p>
  
  <p>..anyhting goes wrong, but I don't know what pls. help...</p>
  
  <p><strong>UPDATE (another opinion)</strong>
  Now i try this:</p>
  
  <pre><code>function mc_encrypt($encrypt, $key = "12345678901234567890123456789012") 
  {
      $encrypt = "Affe";
      $iv2 = ''; 
      for($i=0;$i&lt;16;$i++){ $iv2 .= "\0";  }
  
      $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, ($encrypt), MCRYPT_MODE_CBC,$iv2);
      $encode= base64_encode($ciphertext);
  
      return $encode;
  }
  </code></pre>
  
  <p>in Obj-C I use also the same framework (still IV is now nil)</p>
  
  <p>...still nothing works...</p>
  
  <p>AND some Objc-C Code:
  note: request responseString is the string comes from above.</p>
  
  <pre><code>NSString *key = @"12345678901234561234567890123456";
  NSLog(@"decrypted: %@",[AESCrypt decrypt:[request responseString] password:key]);
  </code></pre>
  
  <p>output is sometimes nothing, sometimes null.</p>