Specified key is not a valid size for this algorithm...

Posted by phenevo on Stack Overflow See other posts from Stack Overflow or by phenevo
Published on 2010-05-27T07:27:23Z Indexed on 2010/05/27 7:31 UTC
Read the original article Hit count: 1277

Filed under:
|
|

Hi,

I have with this code:

RijndaelManaged rijndaelCipher = new RijndaelManaged();

            // Set key and IV
            rijndaelCipher.Key = Convert.FromBase64String("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345678912");
            rijndaelCipher.IV = Convert.FromBase64String("1234567890123456789012345678901234567890123456789012345678901234");

I get throws :

Specified key is not a valid size for this algorithm.

Specified initialization vector (IV) does not match the block size for this algorithm.

What's wrong with this strings ? Can I count at some examples strings from You ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about encryption