Developer 02 e0a6787a87 feat(RSAFactory): Unterstützung für die Erstellung von RSA-Decryptors hinzugefügt
- Methode `CreateDecryptor` hinzugefügt, um die Erstellung von `IRSADecryptor`-Instanzen zu vereinfachen.
- Stellt sicher, dass Decryptors mit PEM, Aussteller, Empfänger, Verschlüsselungsstatus und Padding-Einstellungen initialisiert werden.
- Bestehende Funktionalität zur Erstellung privater und verschlüsselter privater Schlüssel beibehalten.
- Die RSA-Factory verbessert, um Workflows zur Entschlüsselung besser zu unterstützen.
2024-12-16 10:37:56 +01:00

25 lines
898 B
C#

using System.Security.Cryptography;
namespace DigitalData.Core.Abstractions.Security
{
public interface IRSAFactory
{
string CreatePrivateKeyPem(int? keySizeInBits = null, bool encrypt = false);
string CreateEncryptedPrivateKeyPem(
PbeEncryptionAlgorithm? pbeEncryptionAlgorithm = null,
HashAlgorithmName? hashAlgorithmName = null,
int? iterationCount = null,
int? keySizeInBits = null,
string? password = null);
string CreateEncryptedPrivateKeyPem(
PbeParameters pbeParameters,
int? keySizeInBits = null,
string? password = null);
IRSADecryptor CreateDecryptor(string pem, string? issuer = null, string? audience = null, bool isEncrypted = false, RSAEncryptionPadding? padding = null);
}
public interface IRSAFactory<TParams> : IRSAFactory { }
}