コード例 #1
0
ファイル: Rijndael.cs プロジェクト: kabili207/SharpPrivacy
        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);
        }
コード例 #2
0
 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;
 }