Man page - memcmp(3)

Packages contains this manual

Available languages:

en fr pt_BR pl ko ja ru ro de

Manual

memcmp

이 름
라 이 브 러 리
μš” μ•½
μ„€ λͺ…
반 ν™˜ κ°’
속 μ„±
ν‘œ μ€€
이 λ ₯
CAVEATS
μΆ” κ°€ μ°Έ μ‘°
번 μ—­

이 름

memcmp - λ©” λͺ¨ 리 영 μ—­ λΉ„ ꡐ ν•˜ κΈ°

라 이 브 러 리

ν‘œ μ€€ C 라 이 브 러 리 ( libc , -lc )

μš” μ•½

#include <string.h>

int memcmp(const void s1 [. n ], const void s2 [. n ], size_t n );

μ„€ λͺ…

The memcmp () function compares the first n bytes (each interpreted as unsigned char ) of the memory areas s1 and s2 .

반 ν™˜ κ°’

memcmp () 함 수 λŠ” s1 의 처 음 n λ°” 이 트 κ°€ s2 의 처 음 n λ°” 이 트 보 λ‹€ μž‘ κ±° λ‚˜ κ°™ κ±° λ‚˜ 크 λ‹€ λ©΄ , 각 각 0보 λ‹€ μž‘ 은 μ • 수 , 0, 0보 λ‹€ 큰 μ • 수 λ₯Ό 반 ν™˜ ν•œ λ‹€ .

For a nonzero return value, the sign is determined by the sign of the difference between the first pair of bytes (interpreted as unsigned char ) that differ in s1 and s2 .

If n is zero, the return value is zero.

속 μ„±

이 μ„Ή μ…˜ 에 μ„œ 사 용 되 λŠ” 용 μ–΄ 에 λŒ€ ν•œ μ„€ λͺ… 은 attributes (7)을 μ°Έ μ‘° ν•˜ μ‹­ μ‹œ 였 .

Image grohtml-4017824-1.png

ν‘œ μ€€

C11, POSIX.1-2008.

이 λ ₯

POSIX.1-2001, C89, SVr4, 4.3BSD.

CAVEATS

Do not use memcmp () 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 n (the quantity of bytes compared) is required. Some operating systems provide such a function (e.g., NetBSD’s consttime_memequal ()), but no such function is specified in POSIX. On Linux, you may need to implement such a function yourself.

μΆ” κ°€ μ°Έ μ‘°

bstring (3), strcasecmp (3), strcmp (3), strcoll (3), strncasecmp (3), strncmp (3), wmemcmp (3)

번 μ—­

이 λ§€ 뉴 μ–Ό 페 이 μ§€ 의 ν•œ κ΅­ μ–΄ 번 μ—­ 은 λ‹€ 음 에 의 ν•΄ 편 μ§‘ 되 μ—ˆ 슡 λ‹ˆ λ‹€ : μ • κ°• ν›ˆ <skyeyes@soback.kornet.net>

이 번 μ—­ 은 무 료 λ¬Έ μ„œ μž… λ‹ˆ λ‹€ . μ € μž‘ ꢌ μ‘° 건 에 λŒ€ ν•΄ μ„œ λŠ” GNU General Public License 버 μ „ 3 이 상 을 읽 으 μ‹­ μ‹œ 였 . μ±… μž„ 이 μ—† 슡 λ‹ˆ λ‹€ .

이 λ§€ 뉴 μ–Ό 페 이 μ§€ 의 번 μ—­ 에 μ„œ 였 λ₯˜ λ₯Ό 발 견 ν•˜ λ©΄ translation-team-ko@googlegroups.com 둜 이 λ©” 일 을 보 λ‚΄ μ£Ό μ‹­ μ‹œ 였 .