Expand Minimize
EN
Este conteúdo não está disponível no seu idioma mas aqui tem a versão em inglês.

CertCompareIntegerBlob function

The CertCompareIntegerBlob function compares two integer BLOBs to determine whether they represent equal numeric values.

Syntax


BOOL WINAPI CertCompareIntegerBlob(
  _In_  PCRYPT_INTEGER_BLOB pInt1,
  _In_  PCRYPT_INTEGER_BLOB pInt2
);

Parameters

pInt1 [in]

A pointer to a CRYPT_INTEGER_BLOB structure that contains the first integer in the comparison.

pInt2 [in]

A pointer to a CRYPT_INTEGER_BLOB structure that contains the second integer in the comparison.

Return value

If the representations of the integer BLOBs are identical and the function succeeds, the function returns nonzero (TRUE).

If the function fails, it returns zero (FALSE). For extended error information, call GetLastError.

Remarks

Before doing the comparison, most significant bytes with a value of 0x00 are removed from a positive number. Positive here means that the most significant bit in the next nonzero byte is not set.

Most significant bytes with a value of 0xFF are removed from a negative number. Negative here means that the most significant bit in the next non-0xFF byte is set. This produces the unique representation of that integer, as shown in the following table.

Original bytesReduced form
0xFFFFFF880xFF88
0xFF230xFF23
0x007F0x7F
0x000000800x80

 

Multiple-byte integers are treated as little-endian. The least significant byte is pbData[0]. The most significant byte is pbData[cbData - 1], that is, 0xFFFFFF88 is stored in four bytes as:

{0x88, 0xFF, 0xFF, 0xFF}

Examples

For an example that uses this function, see Example C Program: Using CertOIDToAlgId and CertCompareIntegerBlob.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wincrypt.h

Library

Crypt32.lib

DLL

Crypt32.dll

See also

Data Management Functions
CRYPT_INTEGER_BLOB
GetLastError

 

 

Conteúdo da Comunidade

Adicionar
Mostrar:
© 2014 Microsoft