다음을 통해 공유


BCryptBuffer structure

The BCryptBuffer structure is used to represent a generic CNG buffer.

Syntax

typedef struct _BCryptBuffer {
  ULONG cbBuffer;
  ULONG BufferType;
  PVOID pvBuffer;
} BCryptBuffer, *PBCryptBuffer;

Members

  • cbBuffer
    The size, in bytes, of the buffer.

  • BufferType
    A value that specifies the type of buffer represented by this structure. 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 that is 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 that is 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.

    KDF_LABEL 13
    KDF_CONTEXT 14
    KDF_SALT 15
    KDF_ITERATION_COUNT 16

     

  • pvBuffer
    A 32-bit value defined by the BufferType member.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Bcrypt.h

See also

BCryptBufferDesc

BCryptDeriveKey