HMACSHA512.ProduceLegacyHmacValues Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
ProduceLegacyHmacValues is obsolete. Producing legacy HMAC values is not supported.
Provides a workaround for the .NET Framework 2.0 implementation of the HMACSHA512 algorithm, which is inconsistent with the .NET Framework 2.0 Service Pack 1 implementation.
public:
property bool ProduceLegacyHmacValues { bool get(); void set(bool value); };
public bool ProduceLegacyHmacValues { get; set; }
[System.Obsolete("ProduceLegacyHmacValues is obsolete. Producing legacy HMAC values is not supported.", DiagnosticId="SYSLIB0029", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool ProduceLegacyHmacValues { get; set; }
member this.ProduceLegacyHmacValues : bool with get, set
[<System.Obsolete("ProduceLegacyHmacValues is obsolete. Producing legacy HMAC values is not supported.", DiagnosticId="SYSLIB0029", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.ProduceLegacyHmacValues : bool with get, set
Public Property ProduceLegacyHmacValues As Boolean
true
to enable .NET Framework 2.0 Service Pack 1 applications to interact with .NET Framework 2.0 applications; otherwise, false
.
- Attributes
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 HMACSHA512 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()
{
var hmac = new HMACSHA512();
hmac.ProduceLegacyHmacValues = true;
hmac.Key = // ...Get the HMAC key.
// ...
// Use the HMAC algorithm.
// ...
}
Vara | Útgáfur (Úrelt) |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5 (6, 7, 8, 9) |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET umsögn
.NET er opið verkefni. Veldu tengil til að gefa umsögn: