diff --git a/DigitalData.Core.Abstractions/Security/IAsymCryptHandler.cs b/DigitalData.Core.Abstractions/Security/IAsymCryptHandler.cs index 277acce..fbf56b9 100644 --- a/DigitalData.Core.Abstractions/Security/IAsymCryptHandler.cs +++ b/DigitalData.Core.Abstractions/Security/IAsymCryptHandler.cs @@ -1,6 +1,6 @@ namespace DigitalData.Core.Abstractions.Security { - public interface IAsymCryptHandler : IRSAFactory + public interface IAsymCryptHandler : IAsymmetricKeyFactory { IEnumerable PrivateKeys { get; } diff --git a/DigitalData.Core.Abstractions/Security/IRSAFactory.cs b/DigitalData.Core.Abstractions/Security/IAsymmetricKeyFactory.cs similarity index 94% rename from DigitalData.Core.Abstractions/Security/IRSAFactory.cs rename to DigitalData.Core.Abstractions/Security/IAsymmetricKeyFactory.cs index 214b072..488543c 100644 --- a/DigitalData.Core.Abstractions/Security/IRSAFactory.cs +++ b/DigitalData.Core.Abstractions/Security/IAsymmetricKeyFactory.cs @@ -2,7 +2,7 @@ namespace DigitalData.Core.Abstractions.Security { - public interface IRSAFactory + public interface IAsymmetricKeyFactory { string CreatePrivateKeyPem(int? keySizeInBits = null, bool encrypt = false); diff --git a/DigitalData.Core.Security/AsymCryptHandler.cs b/DigitalData.Core.Security/AsymCryptHandler.cs index 1698ebb..cc0725f 100644 --- a/DigitalData.Core.Security/AsymCryptHandler.cs +++ b/DigitalData.Core.Security/AsymCryptHandler.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.Options; namespace DigitalData.Core.Security { - public class AsymCryptHandler : RSAFactory, IAsymCryptHandler, IRSAFactory + public class AsymCryptHandler : RSAFactory, IAsymCryptHandler, IAsymmetricKeyFactory { public IEnumerable PrivateKeys { get; } diff --git a/DigitalData.Core.Security/Cryptographer/RSAFactory.cs b/DigitalData.Core.Security/Cryptographer/RSAFactory.cs index 28d69e9..c6abada 100644 --- a/DigitalData.Core.Security/Cryptographer/RSAFactory.cs +++ b/DigitalData.Core.Security/Cryptographer/RSAFactory.cs @@ -5,7 +5,7 @@ using System.Security.Cryptography; namespace DigitalData.Core.Security.Cryptographer { - public class RSAFactory : IRSAFactory where TRSAFactoryParams : RSAFactoryParams + public class RSAFactory : IAsymmetricKeyFactory where TRSAFactoryParams : RSAFactoryParams { protected readonly TRSAFactoryParams _params; diff --git a/DigitalData.Core.Security/DIExtensions.cs b/DigitalData.Core.Security/DIExtensions.cs index 11724cd..9a68e7b 100644 --- a/DigitalData.Core.Security/DIExtensions.cs +++ b/DigitalData.Core.Security/DIExtensions.cs @@ -46,7 +46,7 @@ namespace DigitalData.Core.Security public static IServiceCollection AddRSAFactory(this IServiceCollection services, IConfigurationSection section) => services .AddParamsConfigureOptions() .Configure(section) - .AddSingleton>(); + .AddSingleton>(); private static IServiceCollection AddClaimDescriptor(this IServiceCollection services, Func>? claimsMapper = null, diff --git a/DigitalData.Core.Security/Instance.cs b/DigitalData.Core.Security/Instance.cs index e71f5a5..049d7e7 100644 --- a/DigitalData.Core.Security/Instance.cs +++ b/DigitalData.Core.Security/Instance.cs @@ -9,6 +9,6 @@ namespace DigitalData.Core.Security { private static readonly Lazy> LazyInstance = new(() => new(Options.Create(new()))); - public static IRSAFactory RSAFactory => LazyInstance.Value; + public static IAsymmetricKeyFactory RSAFactory => LazyInstance.Value; } } \ No newline at end of file