- 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.
25 lines
898 B
C#
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 { }
|
|
} |