Exemplo n.º 1
0
		public LicenserModel(LocaleManager localeManager)
		{
			this._lM               = localeManager;
			this._settings         = null;
			this._logger           = null;
			this._settingsFileName = null;
		}
Exemplo n.º 2
0
		internal void CreateSettingsAndSave(string fileName)
		{
			RSACryptoServiceProvider rsa = null;

			this._settings = new LicSettingsInfo();

			// sign
			rsa = new RSACryptoServiceProvider();
			this._settings.PrivateKeySign = rsa.ToXmlString(true);
			this._settings.PublicKeySign  = rsa.ToXmlString(false);

			// decrypt
			rsa = new RSACryptoServiceProvider();
			this._settings.PrivateKeyDecrypt = rsa.ToXmlString(true);
			this._settings.PublicKeyDecrypt  = rsa.ToXmlString(false);

			LicSettingsLoader.SaveToXml(fileName, this._settings);

			this._settingsFileName = fileName;
		}
Exemplo n.º 3
0
		internal void LoadSettingsFromFile(string fileName)
		{
			this._settings         = LicSettingsLoader.LoadFromXml(fileName);
			this._settingsFileName = fileName;
		}