public void CanCreateDpapiSymmetricCryptoProviderNodeByData() { INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(ServiceProvider); DpapiSymmetricCryptoProviderNode dpapiProviderNode = nodeCreationService.CreateNodeByDataType(typeof(DpapiSymmetricCryptoProviderData)) as DpapiSymmetricCryptoProviderNode; Assert.IsNotNull(dpapiProviderNode); }
public void DpapiSymmetricCryptoProviderNodeTest() { DataProtectionScope scope = DataProtectionScope.LocalMachine; string name = "some name"; DpapiSymmetricCryptoProviderNode node = new DpapiSymmetricCryptoProviderNode(); node.ProtectionScope = scope; node.Name = name; Assert.AreEqual(scope, node.ProtectionScope); Assert.AreEqual(name, node.Name); DpapiSymmetricCryptoProviderData data = (DpapiSymmetricCryptoProviderData)node.SymmetricCryptoProviderData; Assert.AreEqual(name, data.Name); Assert.AreEqual(scope, data.Scope); }
public void DpapiSymmetricCryptoProviderDataTest() { DataProtectionScope scope = DataProtectionScope.LocalMachine; string name = "some name"; DpapiSymmetricCryptoProviderData data = new DpapiSymmetricCryptoProviderData(); data.Name = name; data.Scope = scope; Assert.AreEqual(name, data.Name); Assert.AreEqual(scope, data.Scope); DpapiSymmetricCryptoProviderNode node = new DpapiSymmetricCryptoProviderNode(data); Assert.AreEqual(name, node.Name); Assert.AreEqual(scope, node.ProtectionScope); }
public void PassingNullInDpapiSymmetricCryptoProviderNodeThrows() { DpapiSymmetricCryptoProviderNode node = new DpapiSymmetricCryptoProviderNode(null); }
public void DpapiSymmetricCryptoProviderNodeName() { DpapiSymmetricCryptoProviderNode dpapiProviderNode = new DpapiSymmetricCryptoProviderNode(); Assert.AreEqual("DPAPI Symmetric Cryptography Provider", dpapiProviderNode.Name); }