Reputation: 77
I have some problem with Rijndael! My problem is: If I use inсorrect key in Decrypt method then Rijndael throw CryptographyException! How can I know that key incorrect? Why does it throw an Exception? I thought that the decrypt method would return garbage!
Upvotes: -1
Views: 109
Reputation: 93948
The only thing that can be incorrect regarding Rijndael is that the size of the key is not supported. For AES, the most used configuration of Rijndael, you have to supply keys of length 128, 192 or 256 bits (or 16, 24 or 32 bytes respectively).
Upvotes: 0