feat: Erweiterung der CryptFactory um RSA-Schlüsselerzeugung und Verschlüsselungsunterstützung
- Hinzugefügt: Eigenschaften KeySizeInBits, Password, PbeEncryptionAlgorithm, PbeHashAlgorithmName, PbeIterationCount und EncryptedPrivateKeyPemLabel zur Unterstützung der Konfiguration von RSA-Schlüsselerzeugung und Verschlüsselung in der CryptFactory. - Hinzugefügt: Methoden CreateRSAPrivateKeyPem und CreateEncryptedPrivateKeyPem zur Erstellung von RSA-Privatschlüsseln und verschlüsselten Private-Key-PEMs. - Geändert: ICryptFactory-Schnittstelle um neue Eigenschaften und Methoden erweitert.
This commit is contained in:
@@ -1,6 +1,30 @@
|
||||
namespace DigitalData.Core.Abstractions.Security
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace DigitalData.Core.Abstractions.Security
|
||||
{
|
||||
public interface ICryptFactory
|
||||
{
|
||||
public int KeySizeInBits { get; init; }
|
||||
|
||||
public string Password { get; init; }
|
||||
|
||||
public PbeEncryptionAlgorithm PbeEncryptionAlgorithm { get; init; }
|
||||
|
||||
public HashAlgorithmName PbeHashAlgorithmName { get; init; }
|
||||
|
||||
public int PbeIterationCount { get; init; }
|
||||
|
||||
public PbeParameters PbeParameters { get; }
|
||||
|
||||
public string EncryptedPrivateKeyPemLabel { get; init; }
|
||||
|
||||
string CreateRSAPrivateKeyPem(int? keySizeInBits = null);
|
||||
|
||||
string CreateEncryptedPrivateKeyPem(
|
||||
int? keySizeInBits = null,
|
||||
string? password = null,
|
||||
PbeEncryptionAlgorithm? pbeEncryptionAlgorithm = null,
|
||||
HashAlgorithmName? hashAlgorithmName = null,
|
||||
int? iterationCount = null);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user