svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
timingsafe_bcmp(3c)
timingsafe_memcmp(3C) Standard C Library Functions timingsafe_memcmp(3C)
NAME
timingsafe_memcmp, timingsafe_bcmp - timing safe memory operations
SYNOPSIS
#include <string.h>
int timingsafe_memcmp(const void *s1, const void *s2, size_t n);
int timingsafe_bcmp(const void *s1, const void *s2, size_t n);
DESCRIPTION
The timingsafe_memcmp() and timingsafe_bcmp() functions operate on mem‐
ory areas that are arrays of bytes bounded by a count. The execution
times of these functions are not affected by the memory contents of
their arguments. They are designed to be used in timing sensitive use
cases, for example, cryptography.
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, correspond‐
ing to whether 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.
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.
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-LevelAsync-Signal-
Safe _ StandardNone
SEE ALSO
bcmp(3C), memcmp(3C), attributes(7)
HISTORY
The timingsafe_memcmp() and timingsafe_bcmp() functions were added to
Oracle Solaris in the 11.4.0 release.
Oracle Solaris 11.4 2 Jun 2022 timingsafe_memcmp(3C)