mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
Merge remote-tracking branch 'origin/maint-0.2.2'
This commit is contained in:
commit
ced06a8009
@ -3,18 +3,18 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file di_ops.c
|
* \file di_ops.c
|
||||||
* \brief Functions for data-independent operations
|
* \brief Functions for data-independent operations.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "orconfig.h"
|
#include "orconfig.h"
|
||||||
#include "di_ops.h"
|
#include "di_ops.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Timing-safe version of memcmp. As memcmp, compare the <b>sz</b> bytes
|
* Timing-safe version of memcmp. As memcmp, compare the <b>sz</b> bytes at
|
||||||
* at <b>a</b> with the <b>sz</b> bytes at <b>, and returns less than 0 if the
|
* <b>a</b> with the <b>sz</b> bytes at <b>b</b>, and return less than 0 if
|
||||||
* bytes at <b>a</b> lexically precede those at <b>b</b>, 0 if the byte ranges
|
* the bytes at <b>a</b> lexically precede those at <b>b</b>, 0 if the byte
|
||||||
* are equal, and greater than zero if the bytes at <b>a</b> lexically follow
|
* ranges are equal, and greater than zero if the bytes at <b>a</b> lexically
|
||||||
* those at <b>.
|
* follow those at <b>b</b>.
|
||||||
*
|
*
|
||||||
* This implementation differs from memcmp in that its timing behavior is not
|
* This implementation differs from memcmp in that its timing behavior is not
|
||||||
* data-dependent: it should return in the same amount of time regardless of
|
* data-dependent: it should return in the same amount of time regardless of
|
||||||
@ -85,7 +85,7 @@ tor_memcmp(const void *a, const void *b, size_t len)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Timing-safe memory comparison. Return true if the <b>sz</b> bytes at
|
* Timing-safe memory comparison. Return true if the <b>sz</b> bytes at
|
||||||
* <b>a</b> are the same as the <b>sz</b> bytes at <b>, and 0 otherwise.
|
* <b>a</b> are the same as the <b>sz</b> bytes at <b>b</b>, and 0 otherwise.
|
||||||
*
|
*
|
||||||
* This implementation differs from !memcmp(a,b,sz) in that its timing
|
* This implementation differs from !memcmp(a,b,sz) in that its timing
|
||||||
* behavior is not data-dependent: it should return in the same amount of time
|
* behavior is not data-dependent: it should return in the same amount of time
|
||||||
|
Loading…
Reference in New Issue
Block a user