CoseMultiSignMessage.AddSignatureForDetachedAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Asynchronously adds a signature for the specified content to this message.
public System.Threading.Tasks.Task AddSignatureForDetachedAsync (System.IO.Stream detachedContent, System.Security.Cryptography.Cose.CoseSigner signer, ReadOnlyMemory<byte> associatedData = default, System.Threading.CancellationToken cancellationToken = default);
member this.AddSignatureForDetachedAsync : System.IO.Stream * System.Security.Cryptography.Cose.CoseSigner * ReadOnlyMemory<byte> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AddSignatureForDetachedAsync (detachedContent As Stream, signer As CoseSigner, Optional associatedData As ReadOnlyMemory(Of Byte) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- detachedContent
- Stream
The content to sign.
- signer
- CoseSigner
The signer information used to sign the content.
- associatedData
- ReadOnlyMemory<Byte>
The extra data associated with the signature, which must also be provided during verification.
- cancellationToken
- CancellationToken
The token to monitor for cancellation requests. The default value is None.
Returns
A task that represents the asynchronous operation.
Exceptions
detachedContent
or signer
is null
.
detachedContent
does not support reading or seeking.
-or-
The ProtectedHeaders and UnprotectedHeaders collections in signer
have one or more labels in common.
-or-
One or more of the labels specified in a CriticalHeaders header is missing.
The content is embedded on this message, use an overload that uses embedded content.
The cancellation token was canceled. This exception is stored into the returned task.
Applies to
.NET