HMACSHA384.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 .NET Framework 2.0 de l’algorithme HMACSHA384, qui est incompatible avec l’implémentation .NET Framework 2.0 Service Pack 1 de l’algorithme.
public:
property bool ProduceLegacyHmacValues { bool get(); void set(bool value); };
[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; }
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}")>]
member this.ProduceLegacyHmacValues : bool with get, set
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 propriété booléenne ProduceLegacyHmacValues consiste à permettre aux applications .NET Framework 2.0 Service Pack 1 d’interagir avec les applications .NET Framework 2.0. Lorsque vous définissez cette propriété sur true, l’objet HMACSHA384 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 devrez réinitialiser votre clé par la suite, comme illustré dans l’exemple suivant.
public static void Test()
{
var hmac = new HMACSHA384();
hmac.ProduceLegacyHmacValues = true;
hmac.Key = // ...Get the HMAC key.
// ...
// Use the HMAC algorithm.
// ...
}