DataProtectionCommonExtensions.Protect(IDataProtector, String) Method
Definition
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.