ITimeLimitedDataProtector 接口

定义

一个接口,可提供数据保护服务,其中有效负载的生存期有限。

public interface class ITimeLimitedDataProtector : Microsoft::AspNetCore::DataProtection::IDataProtector
public interface ITimeLimitedDataProtector : Microsoft.AspNetCore.DataProtection.IDataProtector
type ITimeLimitedDataProtector = interface
    interface IDataProtector
    interface IDataProtectionProvider
Public Interface ITimeLimitedDataProtector
Implements IDataProtector
实现

注解

有效负载生存期应略短。 通过此机制保护的有效负载不适用于长期持久性 (例如,) 超过几周。

方法

CreateProtector(String)

ITimeLimitedDataProtector创建给定的用途。

Protect(Byte[])

以加密方式保护一段纯文本数据。

(继承自 IDataProtector)
Protect(Byte[], DateTimeOffset)

以加密方式保护一段纯文本数据,在所选时间过期数据。

Unprotect(Byte[])

以加密方式取消保护一段受保护的数据。

(继承自 IDataProtector)
Unprotect(Byte[], DateTimeOffset)

以加密方式取消保护一段受保护的数据。

扩展方法

Protect(ITimeLimitedDataProtector, Byte[], TimeSpan)

以加密方式保护一段纯文本数据,在指定的时间过后过期数据。

Protect(ITimeLimitedDataProtector, String, DateTimeOffset)

以加密方式保护一段纯文本数据,在所选时间过期数据。

Protect(ITimeLimitedDataProtector, String, TimeSpan)

以加密方式保护一段纯文本数据,在指定的时间过后过期数据。

ToTimeLimitedDataProtector(IDataProtector)

IDataProtector 转换为 , ITimeLimitedDataProtector 以便可以使用有限生存期保护有效负载。

Unprotect(ITimeLimitedDataProtector, String, DateTimeOffset)

以加密方式取消保护一段受保护的数据。

CreateProtector(IDataProtectionProvider, IEnumerable<String>)

IDataProtector创建给定的用途列表。

CreateProtector(IDataProtectionProvider, String, String[])

IDataProtector创建给定的用途列表。

Protect(IDataProtector, String)

以加密方式保护一段纯文本数据。

Unprotect(IDataProtector, String)

以加密方式取消保护一段受保护的数据。

适用于