Reputation: 8415
what are default values for RijndaelManaged class properties KeySize , BlockSize , FeedbackSize and Padding ? and are default values the best too or not ?
Upvotes: 5
Views: 3575
Reputation: 3593
If you take a look at the "System.Security.Cryptography" class which Rijndael inherits from, this is what you will see in the comments.
// Summary:
// Gets or sets the padding mode used in the symmetric algorithm.
//
// Returns:
// The padding mode used in the symmetric algorithm. The default is System.Security.Cryptography.PaddingMode.PKCS7.
//
// Exceptions:
// T:System.Security.Cryptography.CryptographicException:
// The padding mode is not one of the System.Security.Cryptography.PaddingMode values.
public virtual PaddingMode Padding { get; set; }
Upvotes: 1
Reputation: 20693
Here is the parameterless constructor of Rijndeal class (RijndaelManaged inherits form that class)
protected Rijndael()
{
this.KeySizeValue = 256;
this.BlockSizeValue = 128;
this.FeedbackSizeValue = this.BlockSizeValue;
this.LegalBlockSizesValue = Rijndael.s_legalBlockSizes;
this.LegalKeySizesValue = Rijndael.s_legalKeySizes;
}
What are the best values, that is hard to say, it depends from your usage. That's way they are defined as properties :)
Upvotes: 4