You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
743 B
Groff
21 lines
743 B
Groff
.TH byte_start 3
|
|
.SH NAME
|
|
byte_start \- find out if string b is prefix of string a
|
|
.SH SYNTAX
|
|
.B #include <libowfat/byte.h>
|
|
|
|
int \fBbyte_start\fP(const char *\fIa\fR,size_t \fIalen\fR,const char *\fIb\fR,size_t blen);
|
|
.SH DESCRIPTION
|
|
\fIbyte_start\fR returns 1 if \fIalen\fR >= \fIblen\fR and the first \fIblen\fR bytes from
|
|
\fIa\fR and \fIb\fR are equal.
|
|
|
|
When \fIblen\fR is too large or the strings are different, \fIbyte_start\fR does not
|
|
read bytes past the first difference. An attacker observing the
|
|
execution timing can thus learn where the first mismatch happened.
|
|
|
|
Use \fIbyte_equal_notimingattack\fR to compare keys, passphrases, cookies or
|
|
hashes instead.
|
|
|
|
.SH "SEE ALSO"
|
|
byte_equal(3), byte_equal_notimingattack(3), byte_starts(3)
|