Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize

CRYPT_KEY_SIGN_MESSAGE_PARA structure

The CRYPT_KEY_SIGN_MESSAGE_PARA structure contains information about the cryptographic service provider (CSP) and algorithms used to sign a message.

Syntax


typedef struct _CRYPT_KEY_SIGN_MESSAGE_PARA {
  DWORD                      cbSize;
  DWORD                      dwMsgAndCertEncodingType;
  union {
    HCRYPTPROV        hCryptProv;
    NCRYPT_KEY_HANDLE hNCryptKey;
  };
  DWORD                      dwKeySpec;
  CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm;
  void                       *pvHashAuxInfo;
  CRYPT_ALGORITHM_IDENTIFIER PubKeyAlgorithm;
} CRYPT_KEY_SIGN_MESSAGE_PARA, *PCRYPT_KEY_SIGN_MESSAGE_PARA;

Members

cbSize

The size, in bytes, of this data structure.

dwMsgAndCertEncodingType

Specifies the type of message and certificate encoding used. This can be a combination of one or more of the following values.

ValueMeaning
X509_ASN_ENCODING

Specifies X.509 certificate encoding.

PKCS_7_ASN_ENCODING

Specifies PKCS 7 message encoding.

 

hCryptProv

The handle of the CSP to use to sign the message. The CryptAcquireContext function is called to obtain this handle.

hNCryptKey

The handle of the Cryptography API: Next Generation (CNG) CSP to use to sign the message. CNG signature algorithms are only supported in CNG functions.

dwKeySpec

Identifies the type of private key to use to sign the message. This must be one of the following values. This member is ignored if a CNG key is passed in the hNCryptKey member.

ValueMeaning
AT_KEYEXCHANGE

Use the key exchange key.

AT_SIGNATURE

Use the digital signature key.

 

HashAlgorithm

A CRYPT_ALGORITHM_IDENTIFIER structure that specifies the algorithm to use to generate the hash of the message. This must be a hash algorithm.

pvHashAuxInfo

This member is not used and must be set to NULL.

PubKeyAlgorithm

A CRYPT_ALGORITHM_IDENTIFIER structure that specifies the algorithm to use to sign the message. This must be either a public key or a signature algorithm.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wincrypt.h

 

 

Community Additions

ADD
Show:
© 2015 Microsoft