CoseSign1Message.VerifyDetachedAsync 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
| VerifyDetachedAsync(AsymmetricAlgorithm, Stream, ReadOnlyMemory<Byte>, CancellationToken) |
Verifica in modo asincrono che la firma sia valida per il contenuto usando la chiave specificata. |
| VerifyDetachedAsync(CoseKey, Stream, ReadOnlyMemory<Byte>, CancellationToken) |
VerifyDetachedAsync(AsymmetricAlgorithm, Stream, ReadOnlyMemory<Byte>, CancellationToken)
- Origine:
- CoseSign1Message.cs
- Origine:
- CoseSign1Message.cs
- Origine:
- CoseSign1Message.cs
Verifica in modo asincrono che la firma sia valida per il contenuto usando la chiave specificata.
public System.Threading.Tasks.Task<bool> VerifyDetachedAsync(System.Security.Cryptography.AsymmetricAlgorithm key, System.IO.Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, System.Threading.CancellationToken cancellationToken = default);
member this.VerifyDetachedAsync : System.Security.Cryptography.AsymmetricAlgorithm * System.IO.Stream * ReadOnlyMemory<byte> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function VerifyDetachedAsync (key As AsymmetricAlgorithm, detachedContent As Stream, Optional associatedData As ReadOnlyMemory(Of Byte) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parametri
Chiave pubblica associata alla chiave privata usata per firmare il contenuto.
- detachedContent
- Stream
Contenuto firmato in precedenza.
- associatedData
- ReadOnlyMemory<Byte>
Dati aggiuntivi associati alla firma, che devono corrispondere al valore specificato durante la firma.
- cancellationToken
- CancellationToken
Token da monitorare per le richieste di annullamento. Il valore predefinito è None.
Restituisce
Attività la cui Task<TResult> proprietà è se la firma è true valida; in caso contrario, false.
Eccezioni
key o detachedContent è null.
key è di un tipo non supportato.
-oppure-
detachedContent non supporta la lettura o la ricerca.
Il contenuto è incorporato in questo messaggio, usare un overload che usa contenuto incorporato.
ProtectedHeaders non ha un valore per l'intestazione Algorithm .
-oppure-
L'intestazione protetta dall'algoritmo non è stata formattata correttamente.
-oppure-
L'intestazione protetta dall'algoritmo non è uno dei valori supportati da questa implementazione.
-oppure-
L'intestazione protetta dall'algoritmo non corrisponde agli algoritmi supportati dall'oggetto specificato key.
Il token di annullamento è stato annullato. Questa eccezione viene archiviata nell'attività restituita.
Si applica a
VerifyDetachedAsync(CoseKey, Stream, ReadOnlyMemory<Byte>, CancellationToken)
- Origine:
- CoseSign1Message.cs
public System.Threading.Tasks.Task<bool> VerifyDetachedAsync(System.Security.Cryptography.Cose.CoseKey key, System.IO.Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, System.Threading.CancellationToken cancellationToken = default);
member this.VerifyDetachedAsync : System.Security.Cryptography.Cose.CoseKey * System.IO.Stream * ReadOnlyMemory<byte> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function VerifyDetachedAsync (key As CoseKey, detachedContent As Stream, Optional associatedData As ReadOnlyMemory(Of Byte) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parametri
- key
- CoseKey
- detachedContent
- Stream
- associatedData
- ReadOnlyMemory<Byte>
- cancellationToken
- CancellationToken