Szerkesztés

Megosztás a következőn keresztül:


DataProtector.PrependHashedPurposeToPlaintext Property

Definition

Specifies whether the hash is prepended to the text array before encryption.

protected:
 virtual property bool PrependHashedPurposeToPlaintext { bool get(); };
protected virtual bool PrependHashedPurposeToPlaintext { get; }
member this.PrependHashedPurposeToPlaintext : bool
Protected Overridable ReadOnly Property PrependHashedPurposeToPlaintext As Boolean

Property Value

Always true.

Remarks

By default, it is assumed that derived classes will prepend the hash of the ApplicationName, PrimaryPurpose, and SpecificPurposes properties to the plain text before encryption, and will check and verify the hash during decryption. If a derived class wants to specify the prepended data on its own (for example as an optional entropy value), this property can be overridden and set to return false. If PrependHashedPurposeToPlaintext is false, Protect and Unprotect passes directly through to the ProviderProtect and ProviderUnprotect overrides without altering the byte array.

Applies to