]>
git.saurik.com Git - apple/security.git/blob - utilities/src/comparison.c
5 // Created by Keith Henrickson on 7/1/12.
6 // Copyright (c) 2012 Apple Inc. All rights reserved.
11 #include "comparison.h"
13 uint64_t constant_memcmp(const uint8_t *first
, const uint8_t *second
, size_t count
) {
14 uint64_t error_counter
= 0;
15 for (size_t counter
= 0; counter
< count
; counter
++) {
16 error_counter
|= first
[counter
] ^ second
[counter
];