refactor(IRSAFactory): Erstellt, um die Funktionalität von RSAFactory zu trennen
This commit is contained in:
32
DigitalData.Core.Abstractions/Security/IRSAFactory.cs
Normal file
32
DigitalData.Core.Abstractions/Security/IRSAFactory.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace DigitalData.Core.Abstractions.Security
|
||||
{
|
||||
public interface IRSAFactory
|
||||
{
|
||||
int KeySizeInBits { get; init; }
|
||||
|
||||
string PbePassword { init; }
|
||||
|
||||
PbeEncryptionAlgorithm PbeEncryptionAlgorithm { get; init; }
|
||||
|
||||
HashAlgorithmName PbeHashAlgorithmName { get; init; }
|
||||
|
||||
int PbeIterationCount { get; init; }
|
||||
|
||||
PbeParameters PbeParameters { get; }
|
||||
|
||||
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);
|
||||
|
||||
Task<IRSADecryptor> ReadRSADecryptorAsync(string path, Version? version = null, CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user