feat(core): add IRsaKeyService interface
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
namespace JdeScoping.Core.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// RSA key management for login encryption.
|
||||
/// </summary>
|
||||
public interface IRsaKeyService
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the server's public key in PEM format.
|
||||
/// </summary>
|
||||
string GetPublicKeyPem();
|
||||
|
||||
/// <summary>
|
||||
/// Decrypts RSA-OAEP encrypted data.
|
||||
/// </summary>
|
||||
/// <param name="ciphertext">Encrypted bytes</param>
|
||||
/// <returns>Decrypted plaintext bytes</returns>
|
||||
byte[] Decrypt(byte[] ciphertext);
|
||||
}
|
||||
Reference in New Issue
Block a user