feat(RSACryptographer): Verfall hinzugefügt
This commit is contained in:
parent
750f7bc20c
commit
c03f39c1a9
@ -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() { }
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user