ITimeLimitedDataProtector.Protect(Byte[], DateTimeOffset) Method

Definition

Cryptographically protects a piece of plaintext data, expiring the data at the chosen time.

public:
 cli::array <System::Byte> ^ Protect(cli::array <System::Byte> ^ plaintext, DateTimeOffset expiration);
public byte[] Protect (byte[] plaintext, DateTimeOffset expiration);
abstract member Protect : byte[] * DateTimeOffset -> byte[]
Public Function Protect (plaintext As Byte(), expiration As DateTimeOffset) As Byte()

Parameters

plaintext
Byte[]

The plaintext data to protect.

expiration
DateTimeOffset

The time when this payload should expire.

Returns

Byte[]

The protected form of the plaintext data.

Applies to