DataProtectionAdvancedExtensions.Protect 方法

定义

重载

Protect(ITimeLimitedDataProtector, Byte[], TimeSpan)

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

Protect(ITimeLimitedDataProtector, String, DateTimeOffset)

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

Protect(ITimeLimitedDataProtector, String, TimeSpan)

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

Protect(ITimeLimitedDataProtector, Byte[], TimeSpan)

Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs

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

public:
[System::Runtime::CompilerServices::Extension]
 static cli::array <System::Byte> ^ Protect(Microsoft::AspNetCore::DataProtection::ITimeLimitedDataProtector ^ protector, cli::array <System::Byte> ^ plaintext, TimeSpan lifetime);
public static byte[] Protect (this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, byte[] plaintext, TimeSpan lifetime);
static member Protect : Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector * byte[] * TimeSpan -> byte[]
<Extension()>
Public Function Protect (protector As ITimeLimitedDataProtector, plaintext As Byte(), lifetime As TimeSpan) As Byte()

参数

protector
ITimeLimitedDataProtector

要使用的保护程序。

plaintext
Byte[]

要保护的纯文本数据。

lifetime
TimeSpan

有效负载不再可保护的时间量。

返回

Byte[]

纯文本数据的受保护形式。

适用于

Protect(ITimeLimitedDataProtector, String, DateTimeOffset)

Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs

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

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ Protect(Microsoft::AspNetCore::DataProtection::ITimeLimitedDataProtector ^ protector, System::String ^ plaintext, DateTimeOffset expiration);
public static string Protect (this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, string plaintext, DateTimeOffset expiration);
static member Protect : Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector * string * DateTimeOffset -> string
<Extension()>
Public Function Protect (protector As ITimeLimitedDataProtector, plaintext As String, expiration As DateTimeOffset) As String

参数

protector
ITimeLimitedDataProtector

要使用的保护程序。

plaintext
String

要保护的纯文本数据。

expiration
DateTimeOffset

此有效负载应过期的时间。

返回

纯文本数据的受保护形式。

适用于

Protect(ITimeLimitedDataProtector, String, TimeSpan)

Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs
Source:
DataProtectionAdvancedExtensions.cs

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

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ Protect(Microsoft::AspNetCore::DataProtection::ITimeLimitedDataProtector ^ protector, System::String ^ plaintext, TimeSpan lifetime);
public static string Protect (this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, string plaintext, TimeSpan lifetime);
static member Protect : Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector * string * TimeSpan -> string
<Extension()>
Public Function Protect (protector As ITimeLimitedDataProtector, plaintext As String, lifetime As TimeSpan) As String

参数

protector
ITimeLimitedDataProtector

要使用的保护程序。

plaintext
String

要保护的纯文本数据。

lifetime
TimeSpan

有效负载不再可保护的时间量。

返回

纯文本数据的受保护形式。

适用于