MLDsa.SignPreHash 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 |
|---|---|
| SignPreHash(ReadOnlySpan<Byte>, Span<Byte>, String, ReadOnlySpan<Byte>) |
Firma l'hash specificato usando l'algoritmo di firma pre-hash FIPS 204, scrivendo la firma nel buffer fornito. |
| SignPreHash(Byte[], String, Byte[]) |
Firma l'hash specificato usando l'algoritmo di firma pre-hash FIPS 204. |
SignPreHash(ReadOnlySpan<Byte>, Span<Byte>, String, ReadOnlySpan<Byte>)
- Origine:
- MLDsa.cs
- Origine:
- MLDsa.cs
- Origine:
- MLDsa.cs
Firma l'hash specificato usando l'algoritmo di firma pre-hash FIPS 204, scrivendo la firma nel buffer fornito.
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void SignPreHash(ReadOnlySpan<byte> hash, Span<byte> destination, string hashAlgorithmOid, ReadOnlySpan<byte> context = default);
public void SignPreHash(ReadOnlySpan<byte> hash, Span<byte> destination, string hashAlgorithmOid, ReadOnlySpan<byte> context = default);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.SignPreHash : ReadOnlySpan<byte> * Span<byte> * string * ReadOnlySpan<byte> -> unit
member this.SignPreHash : ReadOnlySpan<byte> * Span<byte> * string * ReadOnlySpan<byte> -> unit
Public Sub SignPreHash (hash As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithmOid As String, Optional context As ReadOnlySpan(Of Byte) = Nothing)
Parametri
- hash
- ReadOnlySpan<Byte>
Hash da firmare.
Buffer per ricevere la firma. La lunghezza deve essere esattamente SignatureSizeInBytes.
- hashAlgorithmOid
- String
OID dell'algoritmo hash usato per creare l'hash.
- context
- ReadOnlySpan<Byte>
Valore facoltativo specifico del contesto per limitare l'ambito della firma.
Il valore predefinito è un buffer vuoto.
- Attributi
Eccezioni
hashAlgorithmOid è null.
Il buffer in destination è la lunghezza non corretta per ricevere la firma.
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
L'istanza rappresenta solo una chiave pubblica.
oppure
Errore durante la firma dell'hash.
Si applica a
SignPreHash(Byte[], String, Byte[])
- Origine:
- MLDsa.cs
- Origine:
- MLDsa.cs
- Origine:
- MLDsa.cs
Firma l'hash specificato usando l'algoritmo di firma pre-hash FIPS 204.
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public byte[] SignPreHash(byte[] hash, string hashAlgorithmOid, byte[]? context = default);
public byte[] SignPreHash(byte[] hash, string hashAlgorithmOid, byte[]? context = default);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.SignPreHash : byte[] * string * byte[] -> byte[]
member this.SignPreHash : byte[] * string * byte[] -> byte[]
Public Function SignPreHash (hash As Byte(), hashAlgorithmOid As String, Optional context As Byte() = Nothing) As Byte()
Parametri
- hash
- Byte[]
Hash da firmare.
- hashAlgorithmOid
- String
OID dell'algoritmo hash usato per creare l'hash.
- context
- Byte[]
Valore facoltativo specifico del contesto per limitare l'ambito della firma.
Il valore predefinito è null.
Valori restituiti
- Attributi
Eccezioni
hash o hashAlgorithmOid è null.
Errore durante la verifica dei dati.
hashAlgorithmOid non è un OID ben formato.
oppure
hashAlgorithmOid è un algoritmo noto e hash non ha la lunghezza prevista.
oppure
L'istanza rappresenta solo una chiave pubblica.
oppure
Errore durante la firma dell'hash.