public void Init(SerialNumbersSettings.ProtectedApp app) { string pubKey; switch (app) { case SerialNumbersSettings.ProtectedApp.SecureMemo: pubKey = SerialNumbersSettings.ProtectedApplications.PublicKeys.SecureMemo; break; case SerialNumbersSettings.ProtectedApp.SearchForDuplicates: pubKey = SerialNumbersSettings.ProtectedApplications.PublicKeys.SearchForDuplicates; break; default: throw new ArgumentOutOfRangeException("app"); } RSA_AsymetricEncryption rsaAsymetricEncryption = new RSA_AsymetricEncryption(); RSAKeySetIdentity rsaPublicKeySetIdentity = new RSAKeySetIdentity("", pubKey); RSAParameters rsaPublicKey = rsaAsymetricEncryption.ParseRSAPublicKeyOnlyInfo(rsaPublicKeySetIdentity); _serialNumberManager = new SerialNumberManager(rsaPublicKey, app); }
public SerialNumberManager(RSAParameters pubRsaKey, SerialNumbersSettings.ProtectedApp app) { _app = app; _rsaPubKey = pubRsaKey; _licenceData = new LicenceDataModel(); }
public SerialNumberGenerator(RSAParameters pubRSAKey, SerialNumbersSettings.ProtectedApp app) { this._app = app; this._rsaPubKey = pubRSAKey; this._licenseData = new LicenseDataModel(); }