title: How to use Rijndael algorithm with 256 long block size in dotnet core 2.1
body: <p>I'm trying to encrypt a string with <code>RijndaelManaged</code> in order to send it to a third-party service. I've implemented the procedure in older versions of .Net framework (4.5, 4.6.x) like below:</p>
  
  <pre><code>RijndaelManaged rm= new RijndaelManaged();
  rm.KeySize = 256;
  rm.BlockSize = 256;//causes exception in dotnet core 2.1
  rm.Padding = PaddingMode.PKCS7;
  rm.Key = Convert.FromBase64String(this.Key);
  rm.IV = Convert.FromBase64String(this.IV);
  
  var encrypt = rm.CreateEncryptor(rm.Key, rm.IV);
  </code></pre>
  
  <p>According to <a href="https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.rijndaelmanaged?view=netcore-2.1#remarks" rel="noreferrer">documentation</a>, <code>RijndaelManaged</code> class can be used with <code>BlockSize = 256</code>. But, when the code is running in dotenet core 2.1, an exception thrown:</p>
  
  <blockquote>
    <p>System.PlatformNotSupportedException: BlockSize must be 128 in this implementation.
       at System.Security.Cryptography.RijndaelManaged.set_BlockSize(Int32 value)</p>
  </blockquote>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Thanks to @Access-Denied's response, according to <a href="https://github.com/dotnet/corefx/blob/master/src/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/RijndaelImplementation.cs" rel="noreferrer">this</a>, I've noticed that it may be a mistake in dotnet core documentation and I can't use a 256 long <code>BlockSize</code> with <code>RijndaelManaged</code> class. As I mentioned, encrypted data is going to be sent to a third-party service. I have to use Rijndael with a 32 long <code>IV</code>. How can I handle that?</p>