using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace StellaOps.Cryptography;
///
/// Provides per-tenant crypto provider ordering.
/// Implementations are expected to cache results internally (recommended TTL: 60s-5min)
/// to avoid hitting persistence on every crypto operation.
///
public interface ITenantCryptoPreferenceProvider
{
///
/// Returns the tenant's preferred provider ordering, or an empty list if no preferences are set.
/// Only active preferences should be returned, ordered by priority (ascending).
///
/// Tenant identifier (normalised, lower-case).
///
/// Algorithm scope filter (e.g., "SM", "GOST", or "*" for global).
/// Implementations should return global ("*") preferences when no scope-specific preferences exist.
///
/// Cancellation token.
/// Ordered list of provider names; empty list means "use default ordering".
Task> GetPreferredProvidersAsync(
string tenantId,
string algorithmScope = "*",
CancellationToken cancellationToken = default);
}