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)