Easyworship 7 Offline License File Download Info
// Save the license file to disk licenseDoc.Save("license.xml"); }
// Verify the digital signature SignedXml signedXml = new SignedXml(); signedXml.CheckSignature(licenseDoc); Easyworship 7 Offline License File Download
Here's a simple example using C# and XML: // Save the license file to disk licenseDoc
// Check the license file contents string userDetails = licenseDoc.GetElementsByTagName("userDetails")[0].InnerText; string softwareVersion = licenseDoc.GetElementsByTagName("softwareVersion")[0].InnerText; string licenseType = licenseDoc.GetElementsByTagName("licenseType")[0].InnerText; signedXml.SigningKey = new RSACryptoServiceProvider()
// Sign the XML document with a digital signature SignedXml signedXml = new SignedXml(); signedXml.SigningKey = new RSACryptoServiceProvider(); signedXml.ComputeSignature(licenseDoc);
// Generate a license file public void GenerateLicenseFile(string userDetails, string softwareVersion, string licenseType) { // Create an XML document XmlDocument licenseDoc = new XmlDocument(); licenseDoc.CreateElement("license");