1 // Copyright 2015 The Weave Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "src/crypto_utils.h" 6 uw_crypto_utils_equal_(const uint8_t * arr1,const uint8_t * arr2,size_t len)7bool uw_crypto_utils_equal_(const uint8_t* arr1, 8 const uint8_t* arr2, 9 size_t len) { 10 uint8_t diff = 0; 11 for (size_t i = 0; i < len; i++) { 12 diff |= arr1[i] ^ arr2[i]; 13 } 14 15 return 0 == diff; 16 } 17