public static void SetBlockSize_Uses_LegalBlockSizesProperty() { using (SymmetricAlgorithm s = new DoesNotSetKeySizesFields()) { Assert.Throws <CryptographicException>(() => s.BlockSize = 0); s.BlockSize = 8; } }
public static void SetKey_Uses_LegalKeySizesProperty() { using (SymmetricAlgorithm s = new DoesNotSetKeySizesFields()) { Assert.Throws <CryptographicException>(() => s.Key = Array.Empty <byte>()); s.Key = new byte[16]; } }
public static void SetBlockSize_Uses_LegalBlockSizesProperty() { using (SymmetricAlgorithm s = new DoesNotSetKeySizesFields()) { Assert.Throws<CryptographicException>(() => s.BlockSize = 0); s.BlockSize = 8; } }
public static void SetKey_Uses_LegalKeySizesProperty() { using (SymmetricAlgorithm s = new DoesNotSetKeySizesFields()) { Assert.Throws<CryptographicException>(() => s.Key = Array.Empty<byte>()); s.Key = new byte[16]; } }