From 4f96d271f30fbbc9590d95b8b39d5063fed84c06 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Tue, 7 Jan 2025 11:03:14 +0100 Subject: [PATCH] refactor(IRSACryptographer): Umbenennung in IAsymmetricKey --- .../Security/{IRSACryptographer.cs => IAsymmetricKey.cs} | 2 +- DigitalData.Core.Abstractions/Security/IRSADecryptor.cs | 2 +- DigitalData.Core.Abstractions/Security/IRSAEncryptor.cs | 2 +- DigitalData.Core.Security/Cryptographer/RSACryptographer.cs | 2 +- DigitalData.Core.Security/Cryptographer/RSADecryptor.cs | 2 +- DigitalData.Core.Security/Cryptographer/RSAEncryptor.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename DigitalData.Core.Abstractions/Security/{IRSACryptographer.cs => IAsymmetricKey.cs} (86%) diff --git a/DigitalData.Core.Abstractions/Security/IRSACryptographer.cs b/DigitalData.Core.Abstractions/Security/IAsymmetricKey.cs similarity index 86% rename from DigitalData.Core.Abstractions/Security/IRSACryptographer.cs rename to DigitalData.Core.Abstractions/Security/IAsymmetricKey.cs index 6c7e360..196e1d4 100644 --- a/DigitalData.Core.Abstractions/Security/IRSACryptographer.cs +++ b/DigitalData.Core.Abstractions/Security/IAsymmetricKey.cs @@ -3,7 +3,7 @@ using System.Security.Cryptography; namespace DigitalData.Core.Abstractions.Security { - public interface IRSACryptographer : IUniqueSecurityContext + public interface IAsymmetricKey : IUniqueSecurityContext { public string Pem { get; init; } diff --git a/DigitalData.Core.Abstractions/Security/IRSADecryptor.cs b/DigitalData.Core.Abstractions/Security/IRSADecryptor.cs index ec8f069..e36c288 100644 --- a/DigitalData.Core.Abstractions/Security/IRSADecryptor.cs +++ b/DigitalData.Core.Abstractions/Security/IRSADecryptor.cs @@ -2,7 +2,7 @@ namespace DigitalData.Core.Abstractions.Security { - public interface IRSADecryptor : IRSACryptographer + public interface IRSADecryptor : IAsymmetricKey { public bool IsEncrypted { get; init; } diff --git a/DigitalData.Core.Abstractions/Security/IRSAEncryptor.cs b/DigitalData.Core.Abstractions/Security/IRSAEncryptor.cs index cc624d5..3970570 100644 --- a/DigitalData.Core.Abstractions/Security/IRSAEncryptor.cs +++ b/DigitalData.Core.Abstractions/Security/IRSAEncryptor.cs @@ -1,6 +1,6 @@ namespace DigitalData.Core.Abstractions.Security { - public interface IRSAEncryptor : IRSACryptographer + public interface IRSAEncryptor : IAsymmetricKey { public byte[] Encrypt(byte[] data); diff --git a/DigitalData.Core.Security/Cryptographer/RSACryptographer.cs b/DigitalData.Core.Security/Cryptographer/RSACryptographer.cs index f8d57ee..515638f 100644 --- a/DigitalData.Core.Security/Cryptographer/RSACryptographer.cs +++ b/DigitalData.Core.Security/Cryptographer/RSACryptographer.cs @@ -6,7 +6,7 @@ using System.Security.Cryptography; namespace DigitalData.Core.Security.Cryptographer { //TODO: Abstract RSA for future updates (using ECC, El Gamal or Lattice-based Cryptography) - public class RSACryptographer : IRSACryptographer + public class RSACryptographer : IAsymmetricKey { public virtual string Pem { get; init; } diff --git a/DigitalData.Core.Security/Cryptographer/RSADecryptor.cs b/DigitalData.Core.Security/Cryptographer/RSADecryptor.cs index 5171684..12fe75f 100644 --- a/DigitalData.Core.Security/Cryptographer/RSADecryptor.cs +++ b/DigitalData.Core.Security/Cryptographer/RSADecryptor.cs @@ -4,7 +4,7 @@ using System.Security.Cryptography; namespace DigitalData.Core.Security.Cryptographer { - public class RSADecryptor : RSACryptographer, IRSADecryptor, IRSACryptographer + public class RSADecryptor : RSACryptographer, IRSADecryptor, IAsymmetricKey { private string? _pem; diff --git a/DigitalData.Core.Security/Cryptographer/RSAEncryptor.cs b/DigitalData.Core.Security/Cryptographer/RSAEncryptor.cs index fb989b9..b0e57bb 100644 --- a/DigitalData.Core.Security/Cryptographer/RSAEncryptor.cs +++ b/DigitalData.Core.Security/Cryptographer/RSAEncryptor.cs @@ -2,7 +2,7 @@ namespace DigitalData.Core.Security.Cryptographer { - public class RSAEncryptor : RSACryptographer, IRSAEncryptor, IRSACryptographer + public class RSAEncryptor : RSACryptographer, IRSAEncryptor, IAsymmetricKey { public override string Pem {