timingsafe_bcmp(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

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)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3