Export (0) Print
Expand All

DataProtector.PrependHashedPurposeToPlaintext Property

.NET Framework 4.5

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

Namespace:  System.Security.Cryptography
Assembly:  System.Security (in System.Security.dll)

Protected Overridable ReadOnly Property PrependHashedPurposeToPlaintext As Boolean

Property Value

Type: System.Boolean
Always true.

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.

.NET Framework

Supported in: 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft