Skip to main content

Windows Dev Center

CmsAttachedSignature.GenerateSignatureAsync | generateSignatureAsync method

Signs the specified input data using the specified signer information and creates an attached signed CMS message.

Syntax


Windows.Security.Cryptography.Certificates.CmsAttachedSignature.generateSignatureAsync(data, signers, certificates).done( /* Your success and error handlers */ );

public static IAsyncOperation<IBuffer> GenerateSignatureAsync(
  IBuffer data, 
  IEnumerable<CmsSignerInfo> signers, 
  IEnumerable<Certificate> certificates
)

Public Shared Function GenerateSignatureAsync(
  data As IBuffer,  
  signers As IEnumerable(Of CmsSignerInfo),  
  certificates As IEnumerable(Of Certificate) 
) As IAsyncOperation(Of IBuffer)

public:
static IAsyncOperation<IBuffer>^ GenerateSignatureAsync(
  IBuffer^ data, 
  IIterable<CmsSignerInfo>^ signers, 
  IIterable<Certificate>^ certificates
)

Parameters

data

Type: IBuffer

The input data to be signed.

signers

Type: IIterable<CmsSignerInfo> [JavaScript/C++] | System.Collections.Generic.IEnumerable<CmsSignerInfo> [.NET]

The signer information used to compute the signature.

certificates

Type: IIterable<Certificate> [JavaScript/C++] | System.Collections.Generic.IEnumerable<Certificate> [.NET]

The list of certificates to build the chain for the signer certificates.

Return value

Type: IAsyncOperation<IBuffer>

An asynchronous operation to retrieve the attached signed CMS message.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Security.Cryptography.Certificates
Windows::Security::Cryptography::Certificates [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Security.Cryptography.Certificates
Windows::Security::Cryptography::Certificates [C++]

Metadata

Windows.winmd

See also

CmsAttachedSignature