CertCompareIntegerBlob
A version of this page is also available for
4/8/2010
This function compares two integer BLOB structures to determine whether they represent equal numeric values. Before doing the comparison, most significant bytes with a value of 0x00 are removed from a positive number. Positive means that the most significant bit in the next nonzero byte is not set.
Syntax
BOOL WINAPI CertCompareIntegerBlob(
PCRYPT_INTEGER_BLOB pInt1,
PCRYPT_INTEGER_BLOB pInt2
);
Parameters
- pInt1
[in] Pointer to a CRYPT_INTEGER_BLOB structure containing the first integer in the comparison.
- pInt2
[in] Pointer to a CRYPT_INTEGER_BLOB structure containing the second integer in the comparison.
Return Value
If the representations of the integer BLOB structures are identical and the function succeeds, the return value is nonzero, or TRUE.
If the function fails, the return value is zero, or FALSE.
For extended error information, call the GetLastError function.
Remarks
Most significant bytes with a value of 0xFF are removed from a negative number. Negative means that the most significant bit in the next non-0xFF byte is set. This produces the unique representation of that integer. The following table shows examples of this representation.
Original bytes | Reduced form |
---|---|
0xFFFFFF88 |
0xFF88 |
0xFF23 |
0xFF23 |
0x007F |
0x7F |
0x00000080 |
0x80 |
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}.
Requirements
Header | wincrypt.h |
Library | crypt32.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |