public void Test_GetKeyPair() { var keyPair = ModuleScope.GetKeyPair(); Assert.AreEqual(keyPair.Count(), 596); foreach (var k in keyPair) { Console.WriteLine("Key:{0}", k.ToString()); } }
private static void CheckSignedSavedAssembly(string path) { Assert.IsTrue(File.Exists(path)); var assemblyName = AssemblyName.GetAssemblyName(path); Assert.AreEqual(ModuleScope.DEFAULT_ASSEMBLY_NAME, assemblyName.Name); var keyPairBytes = ModuleScope.GetKeyPair(); var keyPair = new StrongNameKeyPair(keyPairBytes); var loadedPublicKey = assemblyName.GetPublicKey(); Assert.AreEqual(keyPair.PublicKey.Length, loadedPublicKey.Length); for (var i = 0; i < keyPair.PublicKey.Length; ++i) { Assert.AreEqual(keyPair.PublicKey[i], loadedPublicKey[i]); } }