You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
660 B

3 months ago
using System.Threading.Tasks;
namespace CellularManagement.Application.Services;
/// <summary>
/// 密钥轮换服务接口
/// </summary>
public interface IKeyRotationService
{
/// <summary>
/// 初始化密钥轮换服务
/// </summary>
Task InitializeAsync();
/// <summary>
/// 获取当前密钥
/// </summary>
string GetCurrentKey();
/// <summary>
/// 获取下一个密钥
/// </summary>
string GetNextKey();
/// <summary>
/// 轮换密钥
/// </summary>
Task RotateKeyAsync();
/// <summary>
/// 验证密钥是否需要轮换
/// </summary>
bool ShouldRotateKey();
}