title: How can I encrypt Rijndael with CFB Mode, Blocksize of 256 bit and Bouncycastle?
body: <p>I'm trying to encrypt a string with rijndael (keysize 256 bit, blocksize 256 bit, CFB mode)
  currently i'm doing something like this:</p>
  
  <pre><code>BufferedBlockCipher c = new BufferedBlockCipher(new CFBBlockCipher(new RijndaelEngine(256), 256));
      c.init(false, new ParametersWithIV(new KeyParameter(keybytes), iv));
  </code></pre>
  
  <p>I can encrypt and decrypt my own stuff just fine. Unfortunately the string i have to decrypt comes from mcrypt in php.</p>
  
  <p>I cant decrypt this string and i guess the failure is on my side. could anybody give me an example how to configure a cipher with the required parameters?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>following some advice here and in the php documentation comments. i changed my cypher to:</p>
  
  <pre><code>PaddedBufferedBlockCipher c = new PaddedBufferedBlockCipher(new CFBBlockCipher(new RijndaelEngine(256)), new ZeroBytePadding());
  </code></pre>
  
  <p>still the encryptions are not compatible.</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>got it working in CBC mode. I guess the problem is somewhere in iv.</p>