2026-03-29 22:02:07 -05:00
|
|
|
namespace StevanFreeborn.Extensions.Configuration.Secure.Cryptography;
|
|
|
|
|
|
2026-04-02 13:51:43 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Defines the contract for cryptographic operations.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface ICryptoProvider
|
2026-03-29 22:02:07 -05:00
|
|
|
{
|
2026-04-02 13:51:43 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Encrypts the provided plain text.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="plainText">The unencrypted string to be encrypted.</param>
|
|
|
|
|
/// <returns>The encrypted cipher text.</returns>
|
2026-03-29 22:02:07 -05:00
|
|
|
string Encrypt(string plainText);
|
2026-04-02 13:51:43 -05:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Decrypts the provided cipher text.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cipherText">The encrypted string to be decrypted.</param>
|
|
|
|
|
/// <returns>The decrypted plain text.</returns>
|
2026-03-29 22:02:07 -05:00
|
|
|
string Decrypt(string cipherText);
|
|
|
|
|
}
|