From 1b210714fd67a5d5841f495aa48e72ae3e7e8506 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Tue, 19 Nov 2024 20:01:54 +0100 Subject: [PATCH] =?UTF-8?q?feat(CryptFactory):=20Startprotokoll=20hinzugef?= =?UTF-8?q?=C3=BCgt,=20um=20Informationen=20=C3=BCber=20Core.Secrets=20ber?= =?UTF-8?q?eitzustellen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalData.Core.Security/CryptFactory.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DigitalData.Core.Security/CryptFactory.cs b/DigitalData.Core.Security/CryptFactory.cs index 8df2214..0e7c5b1 100644 --- a/DigitalData.Core.Security/CryptFactory.cs +++ b/DigitalData.Core.Security/CryptFactory.cs @@ -1,4 +1,5 @@ using DigitalData.Core.Abstractions.Security; +using Microsoft.Extensions.Logging; using System.Security.Cryptography; namespace DigitalData.Core.Security @@ -25,9 +26,11 @@ namespace DigitalData.Core.Security public string EncryptedPrivateKeyPemLabel { get; init; } = "ENCRYPTED PRIVATE KEY"; - public CryptFactory() + public CryptFactory(ILogger? logger = null) { _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)