HMACSHA512.ProduceLegacyHmacValues Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Attention
ProduceLegacyHmacValues is obsolete. Producing legacy HMAC values is not supported.
Fournit une solution de contournement pour l’implémentation de .NET Framework 2.0 de l’algorithme HMACSHA512 , qui est incohérente avec l’implémentation de .NET Framework 2.0 Service Pack 1.
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
Valeur de propriété
true
pour permettre aux applications .NET Framework 2.0 Service Pack 1 d’interagir avec les applications .NET Framework 2.0 ; sinon, false
.
- Attributs
Remarques
L’objectif de la ProduceLegacyHmacValues propriété booléenne est d’activer les applications .NET Framework 2.0 Service Pack 1 pour interagir avec les applications .NET Framework 2.0. Lorsque vous définissez cette propriété sur true
, l’objet HMACSHA512 produit des valeurs qui correspondent aux valeurs produites par .NET Framework 2.0. Vous devez définir cette propriété une seule fois après avoir créé votre objet HMAC. Vous devez réinitialiser votre clé par la suite, comme illustré dans l’exemple suivant.
public static void Test()
{
var hmac = new HMACSHA512();
hmac.ProduceLegacyHmacValues = true;
hmac.Key = // ...Get the HMAC key.
// ...
// Use the HMAC algorithm.
// ...
}