ProduceLegacyHmacValues Property
Collapse the table of content
Expand the table of content

HMACSHA384.ProduceLegacyHmacValues Property

.NET Framework (current version)
 

Provides a workaround for the .NET Framework 2.0 implementation of the HMACSHA384 algorithm, which is inconsistent with the .NET Framework 2.0 Service Pack 1 implementation of the algorithm.

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

public bool ProduceLegacyHmacValues { get; set; }

Property Value

Type: System.Boolean

true to enable .NET Framework 2.0 Service Pack 1 applications to interact with .NET Framework 2.0 applications; otherwise, false.

The purpose of the ProduceLegacyHmacValues Boolean property is to enable .NET Framework 2.0 Service Pack 1 applications to interact with .NET Framework 2.0 applications. When you set this property to true, the HMACSHA384 object produces values that match the values produced by the .NET Framework 2.0. You should set this property only once after you create your HMAC object. You will need to reset your key afterwards, as shown in the following example.

public static void Test()
    {
    HMACSHA384 hmac = new HMACSHA384();
    hmac.ProduceLegacyHmacValues = true;
    hmac.Key = // ...Get the HMAC key.
    // ...
    // Use the HMAC algorithm.
    // ...
    }

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft