1 // Copyright (c) .NET Foundation. All rights reserved. 2 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 3 4 namespace Microsoft.AspNetCore.Identity 5 { 6 /// <summary> 7 /// Used to protect/unprotect lookups with a specific key. 8 /// </summary> 9 public interface ILookupProtector 10 { 11 /// <summary> 12 /// Protect the data using the specified key. 13 /// </summary> 14 /// <param name="keyId">The key to use.</param> 15 /// <param name="data">The data to protect.</param> 16 /// <returns>The protected data.</returns> Protect(string keyId, string data)17 string Protect(string keyId, string data); 18 19 /// <summary> 20 /// Unprotect the data using the specified key. 21 /// </summary> 22 /// <param name="keyId">The key to use.</param> 23 /// <param name="data">The data to unprotect.</param> 24 /// <returns>The original data.</returns> Unprotect(string keyId, string data)25 string Unprotect(string keyId, string data); 26 } 27 }