public UCESignatureSenerioController(IRSAKeyService RSAKeyService)
 {
     InitializeComponent();
     this._RSAKeyService = RSAKeyService;
 }
Exemple #2
0
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILicenseKeyService licenseKeyGenerationService, IRSAKeyService rsaKeyService)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
                app.UseHsts();
            }

            // Generating encryption keys.
            licenseKeyGenerationService.GeneratePublicPrivateKeyPair();
            rsaKeyService.GeneratePublicPrivateKeyPair();

            app.UseHttpsRedirection();
            app.UseStaticFiles();

            app.UseRouting();
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapRazorPages();
                endpoints.MapControllers();

                endpoints.MapControllerRoute(
                    name: "default",
                    pattern: "{controller}/{action=Index}/{id?}");
            });
        }