refactor(PbePassword): CryptFactory.PbePassword.get privat und Secrets.PBE_PASSWORD intern gemacht.

- JsonIgnore-Attribut zu Secrets.PBE_PASSWORD hinzugefügt
 - ICryptFactory.PbePassword.get wurde entfernt.
This commit is contained in:
Developer 02 2024-11-19 19:44:52 +01:00
parent 0169097671
commit 806bc01c17
3 changed files with 7 additions and 4 deletions

View File

@ -6,7 +6,7 @@ namespace DigitalData.Core.Abstractions.Security
{
public int KeySizeInBits { get; init; }
public string PbePassword { get; init; }
public string PbePassword { init; }
public PbeEncryptionAlgorithm PbeEncryptionAlgorithm { get; init; }

View File

@ -11,7 +11,7 @@ namespace DigitalData.Core.Security
public int KeySizeInBits { get; init; } = 2048;
public string PbePassword { get; init; } = Secrets.PBE_PASSWORD;
public string PbePassword { private get; init; } = Secrets.PBE_PASSWORD;
public PbeEncryptionAlgorithm PbeEncryptionAlgorithm { get; init; } = PbeEncryptionAlgorithm.Aes256Cbc;

View File

@ -1,4 +1,6 @@
namespace DigitalData.Core.Security
using System.Text.Json.Serialization;
namespace DigitalData.Core.Security
{
public static class Secrets
{
@ -6,6 +8,7 @@
public static readonly Version Version = new (1, 0);
public static readonly string PBE_PASSWORD = "9mk@i/$QY&Mw@_--dI^ahlXpNKEtv_U-,V-46b19_-Z6-U_*89_n1_-5-r-_+_$_IY_mYQl-";
[JsonIgnore]
internal static readonly string PBE_PASSWORD = "9mk@i/$QY&Mw@_--dI^ahlXpNKEtv_U-,V-46b19_-Z6-U_*89_n1_-5-r-_+_$_IY_mYQl-";
}
}