refactor(RSACryptographer): Interne Methoden zur Konfiguration von RSACryptographen hinzugefügt.
- IsPemNull.get-Methode hinzugefügt, um zu prüfen, ob _pem null ist. - SetPem-Methode hinzugefügt, um pem im Projekt aktualisieren zu können.
This commit is contained in:
@@ -14,6 +14,8 @@ namespace DigitalData.Core.Security.Cryptographer
|
|||||||
init => _pem = value;
|
init => _pem = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal bool IsPemNull => _pem is null;
|
||||||
|
|
||||||
public string? PemPath => FileName is null ? null : Path.Combine(Directory ?? string.Empty, FileName);
|
public string? PemPath => FileName is null ? null : Path.Combine(Directory ?? string.Empty, FileName);
|
||||||
|
|
||||||
public string? Directory { get; set; }
|
public string? Directory { get; set; }
|
||||||
@@ -29,7 +31,9 @@ namespace DigitalData.Core.Security.Cryptographer
|
|||||||
public string Audience { get; init; } = string.Empty;
|
public string Audience { get; init; } = string.Empty;
|
||||||
|
|
||||||
internal RSACryptographer() { }
|
internal RSACryptographer() { }
|
||||||
|
|
||||||
|
internal void SetPem(string pem) => _pem = pem;
|
||||||
|
|
||||||
public virtual void UnableToInitPemEvent() => throw new InvalidOperationException(
|
public virtual void UnableToInitPemEvent() => throw new InvalidOperationException(
|
||||||
$"Pem is not initialized and pem file is null. Issuer is {Issuer} and audience {Audience}.");
|
$"Pem is not initialized and pem file is null. Issuer is {Issuer} and audience {Audience}.");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user