CompatibilityDataProtector Class¶
A System.Security.Cryptography.DataProtector
that can be used by ASP.NET 4.x to interact with ASP.NET Core’s
DataProtection stack. This type is for internal use only and shouldn’t be directly used by
developers.
- Namespace
Microsoft.AspNetCore.DataProtection.SystemWeb
- Assemblies
- Microsoft.AspNetCore.DataProtection.SystemWeb
Inheritance Hierarchy¶
System.Object
System.Security.Cryptography.DataProtector
Microsoft.AspNetCore.DataProtection.SystemWeb.CompatibilityDataProtector
Syntax¶
[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class CompatibilityDataProtector : DataProtector
-
class
Microsoft.AspNetCore.DataProtection.SystemWeb.
CompatibilityDataProtector
Constructors¶
-
CompatibilityDataProtector
(System.String, System.String, System.String[])¶ public CompatibilityDataProtector(string applicationName, string primaryPurpose, string[] specificPurposes)
-
Methods¶
-
IsReprotectRequired
(System.Byte[])¶ Return type: System.Boolean public override bool IsReprotectRequired(byte[] encryptedData)
-
ProviderProtect
(System.Byte[])¶ Return type: System.Byte<System.Byte>[] protected override byte[] ProviderProtect(byte[] userData)
-
ProviderUnprotect
(System.Byte[])¶ Return type: System.Byte<System.Byte>[] protected override byte[] ProviderUnprotect(byte[] encryptedData)
-
RunWithSuppressedPrimaryPurpose
(System.Func<System.Object, System.Byte[], System.Byte[]>, System.Object, System.Byte[])¶ Invokes a delegate where calls to
Microsoft.AspNetCore.DataProtection.SystemWeb.CompatibilityDataProtector.ProviderProtect(System.Byte[])
andMicrosoft.AspNetCore.DataProtection.SystemWeb.CompatibilityDataProtector.ProviderUnprotect(System.Byte[])
will ignore the primary purpose and instead use only the sub-purposes.Return type: System.Byte<System.Byte>[] public static byte[] RunWithSuppressedPrimaryPurpose(Func<object, byte[], byte[]> callback, object state, byte[] input)
-
Properties¶
-
Microsoft.AspNetCore.DataProtection.SystemWeb.CompatibilityDataProtector.
PrependHashedPurposeToPlaintext
¶ Return type: System.Boolean protected override bool PrependHashedPurposeToPlaintext { get; }
-