Exemple #1
0
        public static bool IsValidLicense(string filename)
        {
            if (!File.Exists(filename))
            {
                return(false);
            }
            XmlDocument xmlDocument = new XmlDocument();

            try {
                xmlDocument.Load(filename);
            }
            catch {
                return(false);
            }
            XmlElement xmlElement  = xmlDocument.SelectSingleNode("/root/lic") as XmlElement;
            XmlElement xmlElement2 = xmlDocument.SelectSingleNode("/root/signature") as XmlElement;

            return(xmlElement != null && xmlElement2 != null && ClientMethods.IsValid(xmlElement.OuterXml, xmlElement2.InnerText));
        }
Exemple #2
0
 public static string EncriptarString(string cadena)
 {
     return(ClientMethods.EncryptString(cadena, 1024, "<RSAKeyValue><Modulus>1c+1YbmkGKPjzi1EM3AfQRBt6EJancU0Ht7QFf6AG9mSY6HzxGgdOAY1pXJhY5kgYlIHpVIGbThZ6ts6nRzp+OPlgSasxxQPIDnEUrGR0hLYNdC0VCtoRdavWk37+DHSMEovIfo0tG+2pYdotO4HmrFNcuYb4VMNK+bxH2Mwvgc=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>"));
 }