public Rijndael() { KeySizeValue = 256; BlockSizeValue = 128; FeedbackSizeValue = 128; LegalKeySizesValue = new KeySizes[1]; LegalKeySizesValue[0] = new KeySizes(128, 256, 64); LegalBlockSizesValue = new KeySizes[1]; LegalBlockSizesValue[0] = new KeySizes(128, 256, 64); }
internal bool IsLegalKeySize(KeySizes[] LegalKeys, int Size) { foreach (KeySizes LegalKeySize in LegalKeys) { for (int i=LegalKeySize.MinSize; i<=LegalKeySize.MaxSize; i+=LegalKeySize.SkipSize) { if (i == Size) return true; } } return false; }