Example #1
0
        public bool ValidateCurrentKey(string Key)
        {
            StringCipher Cypher = new StringCipher();
            if (Cypher.Encrypt( Key, cypherKey) == GetProperties("admin"))
            {
                isAdmin=true;
                return true;
            }

            int noLics = Convert.ToInt32(GetProperties("NumberofMachines"));
            for (int i = 1; i <= noLics; i++)
            {

                if (Cypher.Encrypt( Key,cypherKey) == GetProperties("Mkey" + i.ToString()))
                {
                    return checkPayments();
                }

            }
            return false;
        }
Example #2
0
 public string GenerateKey(string Mkey)
 {
     StringCipher Cypher = new StringCipher();
     return Cypher.Encrypt( Mkey,cypherKey);
 }