RemovePkcs8ShroudedKeyBag() public method

public RemovePkcs8ShroudedKeyBag ( AsymmetricAlgorithm aa ) : void
aa System.Security.Cryptography.AsymmetricAlgorithm
return void
Ejemplo n.º 1
0
		public void RemovePkcs8ShroudedKeyBag_Test ()
		{
			PKCS12 p12 = new PKCS12 ();

			p12.AddPkcs8ShroudedKeyBag (RSA.Create ());

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

			p12.RemovePkcs8ShroudedKeyBag (RSA.Create ());

			AssertEquals ("RP.2", p12.Keys.Count, 0);
		}
Ejemplo n.º 2
0
		public void RemovePkcs8ShroudedKeyBag_Test ()
		{
			PKCS12 p12 = new PKCS12 ();
			RSAManaged rsa = new RSAManaged (384);
			p12.AddPkcs8ShroudedKeyBag (rsa);
			Assert.AreEqual (1, p12.Keys.Count, "RP.1");

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

			p12.RemovePkcs8ShroudedKeyBag (rsa);
			Assert.AreEqual (0, p12.Keys.Count, "RP.3");
		}