MLDsa.VerifyPreHash Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
| Nome | Descrizione |
|---|---|
| VerifyPreHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, String, ReadOnlySpan<Byte>) |
Verifica che la firma di pre-hash FIPS 204 specificata sia valida per questa chiave e l'hash fornito. |
| VerifyPreHash(Byte[], Byte[], String, Byte[]) |
Verifica che la firma di pre-hash FIPS 204 specificata sia valida per questa chiave e l'hash fornito. |
VerifyPreHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, String, ReadOnlySpan<Byte>)
- Origine:
- MLDsa.cs
- Origine:
- MLDsa.cs
- Origine:
- MLDsa.cs
Verifica che la firma di pre-hash FIPS 204 specificata sia valida per questa chiave e l'hash fornito.
[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
Parametri
- hash
- ReadOnlySpan<Byte>
Hash da verificare.
- signature
- ReadOnlySpan<Byte>
Firma da verificare.
- hashAlgorithmOid
- String
OID dell'algoritmo hash usato per creare l'hash.
- context
- ReadOnlySpan<Byte>
Valore di contesto fornito durante la firma.
Il valore predefinito è un buffer vuoto.
Valori restituiti
true se la firma convalida l'hash; in caso contrario, false.
- Attributi
Eccezioni
hashAlgorithmOid è null.
context ha un Length valore superiore a 255 byte.
Questa istanza è stata eliminata.
hashAlgorithmOid non è un OID ben formato.
oppure
hashAlgorithmOid è un algoritmo noto e hash non ha la lunghezza prevista.
oppure
Errore durante la verifica dell'hash.
Si applica a
VerifyPreHash(Byte[], Byte[], String, Byte[])
- Origine:
- MLDsa.cs
- Origine:
- MLDsa.cs
- Origine:
- MLDsa.cs
Verifica che la firma di pre-hash FIPS 204 specificata sia valida per questa chiave e l'hash fornito.
[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
Parametri
- hash
- Byte[]
Hash da verificare.
- signature
- Byte[]
Firma da verificare.
- hashAlgorithmOid
- String
OID dell'algoritmo hash usato per creare l'hash.
Valori restituiti
true se la firma convalida l'hash; in caso contrario, false.
- Attributi
Eccezioni
hash o o signaturehashAlgorithmOid è null.
context ha una lunghezza superiore a 255 byte.
Questa istanza è stata eliminata.
hashAlgorithmOid non è un OID ben formato.
oppure
hashAlgorithmOid è un algoritmo noto e hash non ha la lunghezza prevista.
oppure
Errore durante la verifica dell'hash.
Commenti
Un null contesto viene considerato vuoto.