DataProtectionCommonExtensions.Protect(IDataProtector, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Cryptographically protects a piece of plaintext data.
public:
[System::Runtime::CompilerServices::Extension]
static System::String ^ Protect(Microsoft::AspNetCore::DataProtection::IDataProtector ^ protector, System::String ^ plaintext);
public static string Protect (this Microsoft.AspNetCore.DataProtection.IDataProtector protector, string plaintext);
static member Protect : Microsoft.AspNetCore.DataProtection.IDataProtector * string -> string
<Extension()>
Public Function Protect (protector As IDataProtector, plaintext As String) As String
Parameters
- protector
- IDataProtector
The data protector to use for this operation.
- plaintext
- String
The plaintext data to protect.
Returns
The protected form of the plaintext data.