public void TestPrivateKeyReturnsFalseWhenPrivateKeyPresent() { RSAParameters privateAndPublicKey = RSAEncryptionService.GenerateKeys(); RSAEncryptionService baseLineService = new RSAEncryptionService(privateAndPublicKey); Assert.True(baseLineService.PrivateKeyPresent()); }
public void TestPrivateKeyReturnsFalseWhenPrivateKeyNotPresent() { RSAParameters privateAndPublicKey = RSAEncryptionService.GenerateKeys(); RSAParameters publicKey = new RSAParameters { Modulus = privateAndPublicKey.Modulus, Exponent = privateAndPublicKey.Exponent }; RSAEncryptionService baseLineService = new RSAEncryptionService(publicKey); Assert.False(baseLineService.PrivateKeyPresent()); }