refactor(RSAFactory): Schaffung einer nicht-generischen, getrennten Schnittstelle, um eine statische Standardinstanz erstellen zu können.

- Statische Instanzklasse erstellt.
 - Geordnete DI-Registrierungsmethoden.
This commit is contained in:
Developer 02
2024-12-13 13:47:44 +01:00
parent 36f75d003a
commit 7459f05748
4 changed files with 53 additions and 11 deletions

View File

@@ -0,0 +1,14 @@
using DigitalData.Core.Abstractions.Security;
using DigitalData.Core.Security.Config;
using DigitalData.Core.Security.Cryptographer;
using Microsoft.Extensions.Options;
namespace DigitalData.Core.Security
{
public static class Instance
{
private static readonly Lazy<RSAFactory<RSAFactoryParams>> LazyInstance = new(() => new(Options.Create<RSAFactoryParams>(new())));
public static IRSAFactory RSAFactory => LazyInstance.Value;
}
}