public static void DesCannotSetWeakKey() { using (DES d = new DESMinimal()) { foreach (byte[] key in BadKeys()) { Assert.Throws<CryptographicException>(() => d.Key = key); } } }
public static void DesDefaultCtor() { using (DES des = new DESMinimal()) { Assert.Equal(64, des.KeySize); Assert.Equal(64, des.BlockSize); Assert.Equal(CipherMode.CBC, des.Mode); Assert.Equal(PaddingMode.PKCS7, des.Padding); } }