MLDsa.VerifyPreHash Méthode
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.
Surcharges
| Nom | Description |
|---|---|
| VerifyPreHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, String, ReadOnlySpan<Byte>) |
Vérifie que la signature de pré-hachage FIPS 204 spécifiée est valide pour cette clé et le hachage fourni. |
| VerifyPreHash(Byte[], Byte[], String, Byte[]) |
Vérifie que la signature de pré-hachage FIPS 204 spécifiée est valide pour cette clé et le hachage fourni. |
VerifyPreHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, String, ReadOnlySpan<Byte>)
- Source:
- MLDsa.cs
- Source:
- MLDsa.cs
- Source:
- MLDsa.cs
Vérifie que la signature de pré-hachage FIPS 204 spécifiée est valide pour cette clé et le hachage fourni.
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool VerifyPreHash(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> signature, string hashAlgorithmOid, ReadOnlySpan<byte> context = default);
public bool VerifyPreHash(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> signature, string hashAlgorithmOid, ReadOnlySpan<byte> context = default);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.VerifyPreHash : ReadOnlySpan<byte> * ReadOnlySpan<byte> * string * ReadOnlySpan<byte> -> bool
member this.VerifyPreHash : ReadOnlySpan<byte> * ReadOnlySpan<byte> * string * ReadOnlySpan<byte> -> bool
Public Function VerifyPreHash (hash As ReadOnlySpan(Of Byte), signature As ReadOnlySpan(Of Byte), hashAlgorithmOid As String, Optional context As ReadOnlySpan(Of Byte) = Nothing) As Boolean
Paramètres
- hash
- ReadOnlySpan<Byte>
Hachage à vérifier.
- signature
- ReadOnlySpan<Byte>
Signature à vérifier.
- hashAlgorithmOid
- String
OID de l’algorithme de hachage utilisé pour créer le hachage.
- context
- ReadOnlySpan<Byte>
Valeur de contexte fournie lors de la signature.
La valeur par défaut est une mémoire tampon vide.
Retours
true si la signature valide le hachage ; sinon, false.
- Attributs
Exceptions
hashAlgorithmOid a la valeur null.
context
Length comporte plus de 255 octets.
Cette instance a été supprimée.
hashAlgorithmOid n’est pas un OID bien formé.
- ou -
hashAlgorithmOid est un algorithme bien connu et hash n’a pas la longueur attendue.
- ou -
Une erreur s’est produite lors de la vérification du hachage.
S’applique à
VerifyPreHash(Byte[], Byte[], String, Byte[])
- Source:
- MLDsa.cs
- Source:
- MLDsa.cs
- Source:
- MLDsa.cs
Vérifie que la signature de pré-hachage FIPS 204 spécifiée est valide pour cette clé et le hachage fourni.
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool VerifyPreHash(byte[] hash, byte[] signature, string hashAlgorithmOid, byte[]? context = default);
public bool VerifyPreHash(byte[] hash, byte[] signature, string hashAlgorithmOid, byte[]? context = default);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.VerifyPreHash : byte[] * byte[] * string * byte[] -> bool
member this.VerifyPreHash : byte[] * byte[] * string * byte[] -> bool
Public Function VerifyPreHash (hash As Byte(), signature As Byte(), hashAlgorithmOid As String, Optional context As Byte() = Nothing) As Boolean
Paramètres
- hash
- Byte[]
Hachage à vérifier.
- signature
- Byte[]
Signature à vérifier.
- hashAlgorithmOid
- String
OID de l’algorithme de hachage utilisé pour créer le hachage.
Retours
true si la signature valide le hachage ; sinon, false.
- Attributs
Exceptions
hash
signature ou hashAlgorithmOid est null.
context a une longueur supérieure à 255 octets.
Cette instance a été supprimée.
hashAlgorithmOid n’est pas un OID bien formé.
- ou -
hashAlgorithmOid est un algorithme bien connu et hash n’a pas la longueur attendue.
- ou -
Une erreur s’est produite lors de la vérification du hachage.
Remarques
Un null contexte est traité comme vide.