feat(RSACryptographer): Verfall hinzugefügt

This commit is contained in:
Developer 02 2024-12-05 01:15:59 +01:00
parent 750f7bc20c
commit c03f39c1a9

View File

@ -11,6 +11,21 @@ namespace DigitalData.Core.Security
protected virtual RSA RSA { get; } = RSA.Create();
private DateOnly? _expiration;
public DateOnly? Expiration
{
get => _expiration;
init
{
if (value <= DateOnly.FromDateTime(DateTime.Now))
throw new InvalidOperationException("The expiration date has already passed.");
_expiration = value;
}
}
internal RSACryptographer() { }
}
}