public static void SaveLicenseKey(String licenseKey)
        {
            String decryptedLicenseKey = DecryptStringAES(licenseKey, GetUserId());

            byte[] decryptedLicenseData = Encoding.UTF8.GetBytes(decryptedLicenseKey);
            byte[] encryptedLicenseData = Encoding.UTF8.GetBytes(licenseKey);
            IsolatedStorageHelper.Save(LICENSE_KEY_PATH, encryptedLicenseData);
        }
        public static bool IsLicensed()
        {
            if (IsolatedStorageHelper.Exists(LICENSE_KEY_PATH))
            {
                byte[] encryptedLicenseData   = IsolatedStorageHelper.Load(LICENSE_KEY_PATH);
                String encryptedLicenseString = Encoding.UTF8.GetString(encryptedLicenseData);

                // right now it's not used, we don't check what's in
                // if the file exists and it decrypts without exceptions, we assume that it's ok
                // but this data can be used to store license date, user name, email and so on...
                String decryptedLicenseKey = DecryptStringAES(encryptedLicenseString, GetUserId());
                return(StringComparer.Ordinal.Equals(decryptedLicenseKey, "01'\"@'. *!@^@*&#%89~{]{~"));
            }

            return(false);
        }
 public static void Clear()
 {
     _instance._results.Clear();
     IsolatedStorageHelper.Delete(_serializationPath);
 }
 static ResultsStorage()
 {
     AppDomain.CurrentDomain.ProcessExit += (o, e) =>
                                            IsolatedStorageHelper.Save(_serializationPath, SerializationHelper.Serialize(_instance));
 }
 public static bool RemoveLicenseKey()
 {
     return(IsolatedStorageHelper.Delete(LICENSE_KEY_PATH));
 }