feat(Secrets): Statische Klasse Secrets erstellt, um feste Werte wie pbe password zu speichern.
- Statische Eigenschaften wie Version und Erstellungsdatum hinzugefügt, um versteckte Konstanten in der Produktion nach einem Produktionsupdate zu verfolgen.
This commit is contained in:
@@ -11,7 +11,7 @@ namespace DigitalData.Core.Security
|
||||
|
||||
public int KeySizeInBits { get; init; } = 2048;
|
||||
|
||||
public string PbePassword { get; init; }
|
||||
public string PbePassword { get; init; } = Secrets.PBE_PASSWORD;
|
||||
|
||||
public PbeEncryptionAlgorithm PbeEncryptionAlgorithm { get; init; } = PbeEncryptionAlgorithm.Aes256Cbc;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace DigitalData.Core.Security
|
||||
HashAlgorithmName? hashAlgorithmName = null,
|
||||
int? iterationCount = null)
|
||||
{
|
||||
password ??= Password;
|
||||
password ??= PbePassword;
|
||||
|
||||
var pbeParameters = (pbeEncryptionAlgorithm is null && hashAlgorithmName is null && iterationCount is null)
|
||||
? new PbeParameters(
|
||||
|
||||
Reference in New Issue
Block a user