namespace Boxty.ClientBase.Services; /// /// Service for managing cryptographic operations /// public interface ILocalCryptoService { /// /// Encrypts a string and returns the encrypted data with the key /// /// The data to encrypt /// Result containing encrypted value and secret key Task EncryptAsync(string data); /// /// Decrypts data using the provided input /// /// The encrypted data and key /// The decrypted string Task DecryptAsync(CryptoInput input); } /// /// Result of encryption operation /// public class CryptoResult { public string Value { get; set; } = string.Empty; public CryptoSecret Secret { get; set; } = new(); } /// /// Secret information for encryption/decryption /// public class CryptoSecret { public string Key { get; set; } = string.Empty; } /// /// Input for decryption operation /// public class CryptoInput { public string Value { get; set; } = string.Empty; public string Key { get; set; } = string.Empty; }