CoseSign1Message.VerifyDetachedAsync Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
| VerifyDetachedAsync(AsymmetricAlgorithm, Stream, ReadOnlyMemory<Byte>, CancellationToken) |
Asynchronicznie sprawdza, czy podpis jest prawidłowy dla zawartości przy użyciu określonego klucza. |
| VerifyDetachedAsync(CoseKey, Stream, ReadOnlyMemory<Byte>, CancellationToken) |
VerifyDetachedAsync(AsymmetricAlgorithm, Stream, ReadOnlyMemory<Byte>, CancellationToken)
- Źródło:
- CoseSign1Message.cs
- Źródło:
- CoseSign1Message.cs
- Źródło:
- CoseSign1Message.cs
Asynchronicznie sprawdza, czy podpis jest prawidłowy dla zawartości przy użyciu określonego klucza.
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)
Parametry
Klucz publiczny skojarzony z kluczem prywatnym użytym do podpisania zawartości.
- detachedContent
- Stream
Zawartość, która została wcześniej podpisana.
- associatedData
- ReadOnlyMemory<Byte>
Dodatkowe dane skojarzone z podpisem, które muszą być zgodne z wartością podaną podczas podpisywania.
- cancellationToken
- CancellationToken
Token do monitorowania żądań anulowania. Wartość domyślna to None.
Zwraca
Zadanie, którego Task<TResult> właściwość ma true wartość , jeśli podpis jest prawidłowy; w przeciwnym razie false.
Wyjątki
key lub detachedContent ma wartość null.
key jest nieobsługiwanym typem.
-lub-
detachedContent nie obsługuje czytania ani poszukiwania.
Zawartość jest osadzona w tym komunikacie, używając przeciążenia korzystającego z osadzonej zawartości.
ProtectedHeaders nie ma wartości nagłówka Algorithm .
-lub-
Nagłówek chroniony algorytmem został niepoprawnie sformatowany.
-lub-
Nagłówek chroniony algorytmem nie był jedną z wartości obsługiwanych przez tę implementację.
-lub-
Nagłówek chroniony algorytmem nie jest zgodny z algorytmami obsługiwanymi przez określony keyelement .
Token anulowania został anulowany. Ten wyjątek jest przechowywany w zwracanym zadaniu.
Dotyczy
VerifyDetachedAsync(CoseKey, Stream, ReadOnlyMemory<Byte>, CancellationToken)
- Źródło:
- 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)
Parametry
- key
- CoseKey
- detachedContent
- Stream
- associatedData
- ReadOnlyMemory<Byte>
- cancellationToken
- CancellationToken