mojave man page for timingsafe_bcmp

Query: timingsafe_bcmp

OS: mojave

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

TIMINGSAFE_BCMP(3)					   BSD Library Functions Manual 					TIMINGSAFE_BCMP(3)

NAME
timingsafe_bcmp -- timing-safe byte sequence comparisons
SYNOPSIS
#include <string.h> int timingsafe_bcmp(const void *b1, const void *b2, size_t len);
DESCRIPTION
The timingsafe_bcmp() function compares the first len bytes pointed to by b1 and b2. Additionally, the running time is independent of the byte sequences compared, making it safe to use for comparing secret values such as cryp- tographic MACs. In contrast, bcmp(3) and memcmp(3) may short-circuit after finding the first differing byte.
RETURN VALUES
The timingsafe_bcmp() function returns 0 or not zero if the byte sequence pointed to by b1 compares equal to or not equal to (respectively) the byte sequence pointed to by b2.
SEE ALSO
bcmp(3)
STANDARDS
The timingsafe_bcmp() function is a non-standard extension.
HISTORY
The timingsafe_bcmp() function first appeared in OpenBSD 4.9, FreeBSD 12.0, and macOS 10.12.1.
BSD
August 15, 2016 BSD
Related Man Pages
memchr(3) - freebsd
bcmp(3) - linux
bcmp(3) - centos
bcmp(3) - minix
bcmp(3) - x11r4
Similar Topics in the Unix Linux Community
Instructions to Clear Data Cache in Safari, Chrome, Firefox, Opera Browsers (Pictures)
My first PERL incarnation... Audio Oscillograph
Controlling user input
How can I direct messages from mac console.app to a log file?