T_memcmp
342 RSA BSAFE Crypto-C Library Reference Manual
T_memcmp
Description
T_memcmp compares the first
len
bytes of
firstBlock
and
secondBlock
. The value of
len
can be zero, in which case
firstBlock
and
secondBlock
are undefined and T_memcmp
returns zero. T_memcmp compares the blocks by scanning the blocks from lowest
address to highest until a difference is found. The smaller-valued block is the one with
the smaller-valued byte at the point of difference. If no difference is found, then the
blocks are equal.
Return value
int T_memcmp (
POINTER firstBlock, /* first block */
POINTER secondBlock, /* second block */
unsigned int len /* length of blocks */
);
Value Description
< 0
firstBlock
is smaller.
0 The blocks are equal.
> 0
firstBlock
is larger.