Exemple #1
0
        private static bool isLicenseValid(LicenseData licenseData)
        {
            string actualMachineId = GetMachineId();
            var    isValid         = CryptoUtils.VerifyData(actualMachineId, licenseData.Signature);

            return(isValid);
        }
Exemple #2
0
        public static LicenseData GenerateLicenseData(string machineId, string privateKeyXmlString, out string errorMessage)
        {
            var signature = CryptoUtils.GenerateSignature(machineId, privateKeyXmlString, out errorMessage);

            var licenseData = new LicenseData()
            {
                MachineId = machineId,
                Signature = signature,
            };

            return(licenseData);
        }