.\" -*- coding: UTF-8 -*- '\" t .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:55:27 1993 by Rik Faith (faith@cs.unc.edu) .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH memcmp 3 "2023년 7월 30일" "Linux man\-pages 6.05.01" .SH 이름 memcmp \- 메모리 영역 비교하기 .SH 라이브러리 표준 C 라이브러리 (\fIlibc\fP, \fI\-lc\fP) .SH 요약 .nf \fB#include \fP .PP \fBint memcmp(const void \fP\fIs1\fP\fB[.\fP\fIn\fP\fB], const void \fP\fIs2\fP\fB[.\fP\fIn\fP\fB], size_t \fP\fIn\fP\fB);\fP .fi .SH 설명 The \fBmemcmp\fP() function compares the first \fIn\fP bytes (each interpreted as \fIunsigned char\fP) of the memory areas \fIs1\fP and \fIs2\fP. .SH 반환값 \fBmemcmp\fP() 함수는 \fIs1\fP의 처음 \fIn\fP 바이트가 \fIs2\fP의 처음 \fIn\fP 바이트보다 작거나 같거나 크다면, 각각 0보다 작은 정수, 0, 0보다 큰 정수를 반환한다. .PP For a nonzero return value, the sign is determined by the sign of the difference between the first pair of bytes (interpreted as \fIunsigned char\fP) that differ in \fIs1\fP and \fIs2\fP. .PP If \fIn\fP is zero, the return value is zero. .SH 속성 이 섹션에서 사용되는 용어에 대한 설명은 \fBattributes\fP(7)을 참조하십시오. .TS allbox; lbx lb lb l l l. 상호 작용 속성 번호 T{ .na .nh \fBmemcmp\fP() T} Thread safety MT\-Safe .TE .sp 1 .SH 표준 C11, POSIX.1\-2008. .SH 이력 POSIX.1\-2001, C89, SVr4, 4.3BSD. .SH CAVEATS Do not use \fBmemcmp\fP() to compare confidential data, such as cryptographic secrets, because the CPU time required for the comparison depends on the contents of the addresses compared, this function is subject to timing\-based side\-channel attacks. In such cases, a function that performs comparisons in deterministic time, depending only on \fIn\fP (the quantity of bytes compared) is required. Some operating systems provide such a function (e.g., NetBSD's \fBconsttime_memequal\fP()), but no such function is specified in POSIX. On Linux, you may need to implement such a function yourself. .SH "추가 참조" \fBbstring\fP(3), \fBstrcasecmp\fP(3), \fBstrcmp\fP(3), \fBstrcoll\fP(3), \fBstrncasecmp\fP(3), \fBstrncmp\fP(3), \fBwmemcmp\fP(3) .PP .SH 번역 이 매뉴얼 페이지의 한국어 번역은 다음에 의해 편집되었습니다: 정강훈 . .PP 이 번역은 무료 문서입니다. 저작권 조건에 대해서는 .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License 버전 3 .UE 이상을 읽으십시오. 책임이 없습니다. .PP 이 매뉴얼 페이지의 번역에서 오류를 발견하면 .MT translation-team-ko@googlegroups.com .ME 로 이메일을 보내주십시오.