feat(CryptFactory): Startprotokoll hinzugefügt, um Informationen über Core.Secrets bereitzustellen
This commit is contained in:
parent
806bc01c17
commit
1b210714fd
@ -1,4 +1,5 @@
|
|||||||
using DigitalData.Core.Abstractions.Security;
|
using DigitalData.Core.Abstractions.Security;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace DigitalData.Core.Security
|
namespace DigitalData.Core.Security
|
||||||
@ -25,9 +26,11 @@ namespace DigitalData.Core.Security
|
|||||||
|
|
||||||
public string EncryptedPrivateKeyPemLabel { get; init; } = "ENCRYPTED PRIVATE KEY";
|
public string EncryptedPrivateKeyPemLabel { get; init; } = "ENCRYPTED PRIVATE KEY";
|
||||||
|
|
||||||
public CryptFactory()
|
public CryptFactory(ILogger<CryptFactory>? logger = null)
|
||||||
{
|
{
|
||||||
_lazyPbeParameters = new(() => new PbeParameters(PbeEncryptionAlgorithm, PbeHashAlgorithmName, PbeIterationCount));
|
_lazyPbeParameters = new(() => new PbeParameters(PbeEncryptionAlgorithm, PbeHashAlgorithmName, PbeIterationCount));
|
||||||
|
|
||||||
|
logger?.LogInformation("CryptFactory initialized. Core.Secrets version: {Version}, Created on: {CreationDate}.", Secrets.Version, Secrets.CreationDate.ToString("dd.MM.yyyy"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public string CreateRSAPrivateKeyPem(int? keySizeInBits = null)
|
public string CreateRSAPrivateKeyPem(int? keySizeInBits = null)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user