svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
timingsafe_bcmp(3c)
Standard C Library Functions timingsafe_bcmp(3C)
NAME
timingsafe_bcmp, timingsafe_memcmp - timing safe memory operations
SYNOPSIS
#include <string.h>
int timingsafe_bcmp(const void *s1, const void *s2, size_t n);
int timingsafe_memcmp(const void *s1, const void *s2, size_t n);
DESCRIPTION
The timingsafe_bcmp() and timingsafe_memcmp() functions operate on mem‐
ory areas that are arrays of bytes bounded by a count, and not termi‐
nated by a null character. These functions have an execution time that
are not affected by the memory contents of their arguments. They are
designed to be used in timing sensitive use cases, for example, cryp‐
tography.
The timingsafe_bcmp() function compares the first n bytes of its argu‐
ments, returning 0 if they are identical and 1 otherwise. The tim‐
ingsafe_bcmp() function always returns 0 when n is 0.
The timingsafe_memcmp() function compares its arguments looking at the
first n bytes where each is interpreted as an unsigned character. It
returns an integer less than, equal to, or greater than 0, similarly as
s1 is lexicographically less than, equal to, or greater than s2 when
taken to be unsigned characters. The timingsafe_memcmp() function
always returns 0 when n is 0.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe
SEE ALSO
attributes(7)
HISTORY
The timingsafe_bcmp() and timingsafe_memcmp() functions were added to
Oracle Solaris in the 11.4 release.
Oracle Solaris 11.4 9 Jul 2018 timingsafe_bcmp(3C)