NCryptBuffer structure
The NCryptBuffer structure is used to identify a variable-length memory buffer.
Syntax
typedef struct _NCryptBuffer { ULONG cbBuffer; ULONG BufferType; PVOID pvBuffer; } NCryptBuffer, *PNCryptBuffer;
Members
- cbBuffer
-
The size, in bytes, of the buffer.
- BufferType
-
A value that identifies the type of data that is contained by the buffer. This can be one of the following values.
Value Meaning - KDF_HASH_ALGORITHM
- 0
The buffer is a key derivation function (KDF) parameter that contains a null-terminated Unicode string that identifies the hash algorithm. This can be one of the standard hash algorithm identifiers from CNG Algorithm Identifiers or the identifier for another registered hash algorithm.
The size specified by the cbBuffer member of this structure must include the terminating NULL character.
- KDF_SECRET_PREPEND
- 1
The buffer is a KDF parameter that contains the value to add to the beginning of the message input to the hash function.
- KDF_SECRET_APPEND
- 2
The buffer is a KDF parameter that contains the value to add to the end of the message input to the hash function.
- KDF_HMAC_KEY
- 3
The buffer is a KDF parameter that contains the plain text value of the HMAC key.
- KDF_TLS_PRF_LABEL
- 4
The buffer is a KDF parameter that contains an ANSI string that contains the transport layer security (TLS) pseudo-random function (PRF) label.
- KDF_TLS_PRF_SEED
- 5
The buffer is a KDF parameter that contains the PRF seed value. The seed must be 64 bytes long.
- KDF_SECRET_HANDLE
- 6
The buffer is a KDF parameter that contains the secret agreement handle. The pvBuffer member contains a BCRYPT_SECRET_HANDLE value and is not a pointer.
- KDF_TLS_PRF_PROTOCOL
- 7
The buffer is a KDF parameter that contains a DWORD value identifying the SSL/TLS protocol version whose PRF algorithm is to be used.
- KDF_ALGORITHMID
- 8
The buffer is a KDF parameter that contains the byte array to use as the AlgorithmID subfield of the OtherInfo parameter to the SP 800-56A KDF.
- KDF_PARTYUINFO
- 9
The buffer is a KDF parameter that contains the byte array to use as the PartyUInfo subfield of the OtherInfo parameter to the SP 800-56A KDF.
- KDF_PARTYVINFO
- 10
The buffer is a KDF parameter that contains the byte array to use as the PartyVInfo subfield of the OtherInfo parameter to the SP 800-56A KDF.
- KDF_SUPPPUBINFO
- 11
The buffer is a KDF parameter that contains the byte array to use as the SuppPubInfo subfield of the OtherInfo parameter to the SP 800-56A KDF.
- KDF_SUPPPRIVINFO
- 12
The buffer is a KDF parameter that contains the byte array to use as the SuppPrivInfo subfield of the OtherInfo parameter to the SP 800-56A KDF.
- NCRYPTBUFFER_SSL_CLIENT_RANDOM
- 20
The buffer contains the random number of the SSL client.
- NCRYPTBUFFER_SSL_SERVER_RANDOM
- 21
The buffer contains the random number of the SSL server.
- NCRYPTBUFFER_SSL_HIGHEST_VERSION
- 22
The buffer contains the highest SSL version supported.
- NCRYPTBUFFER_SSL_CLEAR_KEY
- 23
The buffer contains the clear portion of the SSL master key.
- NCRYPTBUFFER_SSL_KEY_ARG_DATA
- 24
The buffer contains the SSL key argument data.
- NCRYPTBUFFER_PKCS_OID
- 40
The buffer contains a null-terminated ANSI string that contains the PKCS object identifier.
- NCRYPTBUFFER_PKCS_ALG_OID
- 41
The buffer contains a null-terminated ANSI string that contains the PKCS algorithm object identifier.
- NCRYPTBUFFER_PKCS_ALG_PARAM
- 42
The buffer contains the PKCS algorithm parameters.
- NCRYPTBUFFER_PKCS_ALG_ID
- 43
The buffer contains the PKCS algorithm identifier.
- NCRYPTBUFFER_PKCS_ATTRS
- 44
The buffer contains the PKCS attributes.
- NCRYPTBUFFER_PKCS_KEY_NAME
- 45
The buffer contains a null-terminated Unicode string that contains the key name.
- NCRYPTBUFFER_PKCS_SECRET
- 46
The buffer contains a null-terminated Unicode string that contains the PKCS8 password. This parameter is optional and can be NULL.
- NCRYPTBUFFER_CERT_BLOB
- 47
The buffer contains a serialized certificate store that contains the PKCS certificate. This serialized store is obtained by using the CertSaveStore function with the CERT_STORE_SAVE_TO_MEMORY option. When this property is being retrieved, you can access the certificate store by passing this serialized store to the CertOpenStore function with the CERT_STORE_PROV_SERIALIZED option.
- pvBuffer
-
The address of the buffer. The size of this buffer is contained in the cbBuffer member.
The format and contents of this buffer are identified by the BufferType member.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
See also