16 lines
626 B
C#
16 lines
626 B
C#
using DigitalData.Core.Abstractions.Security;
|
|
using System.Security.Cryptography;
|
|
|
|
namespace DigitalData.Core.Security.RSAKey
|
|
{
|
|
public class RSAKeyBase : IAsymmetricKey
|
|
{
|
|
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
|
public virtual string Content { get; init; }
|
|
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
|
|
|
public string? Id { get; init; }
|
|
|
|
protected virtual RSA RSA { get; } = RSA.Create();
|
|
}
|
|
} |