RemoveKeyBag() public method

public RemoveKeyBag ( AsymmetricAlgorithm aa ) : void
aa System.Security.Cryptography.AsymmetricAlgorithm
return void
Exemplo n.º 1
0
		public void RemoveKeyBag_Test ()
		{
			PKCS12 p12 = new PKCS12 ();

			p12.AddKeyBag (RSA.Create ());

			AssertEquals ("RK.1", p12.Keys.Count, 1);

			p12.RemoveKeyBag (RSA.Create ());

			AssertEquals ("RK.2", p12.Keys.Count, 0);
		}
Exemplo n.º 2
0
		public void RemoveKeyBag_Test ()
		{
			PKCS12 p12 = new PKCS12 ();
			RSAManaged rsa = new RSAManaged (384);
			p12.AddKeyBag (rsa);
			Assert.AreEqual (1, p12.Keys.Count, "RK.1");

			RSAManaged rsa2 = new RSAManaged (384);
			p12.RemoveKeyBag (rsa2);
			Assert.AreEqual (1, p12.Keys.Count, "RK.2");

			p12.RemoveKeyBag (rsa);
			Assert.AreEqual (0, p12.Keys.Count, "RK.3");
		}