No-Typo-Check: Not related to this change. Bug: 161477208 Change-Id: I99e4780f6855b7045aa0cd5a49c13d2d0d51ed64
30 lines
940 B
C
30 lines
940 B
C
// Copyright 2019 Google LLC. All rights reserved. This file and proprietary
|
|
// source code may only be used and distributed under the Widevine
|
|
// License Agreement.
|
|
|
|
#ifndef WIDEVINE_ODK_SRC_ODK_UTIL_H_
|
|
#define WIDEVINE_ODK_SRC_ODK_UTIL_H_
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#include "odk_structs.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* crypto_memcmp returns zero iff the |len| bytes at |a| and |b| are equal. It
|
|
* takes an amount of time dependent on |len|, but independent of the contents
|
|
* of |a| and |b|. Unlike memcmp, it cannot be used to order elements as the
|
|
* return value when a != b is undefined, other than being non-zero. */
|
|
int crypto_memcmp(const void* a, const void* b, size_t len);
|
|
|
|
bool ODK_NonceValuesEqualExcludingVersion(const ODK_NonceValues* a,
|
|
const ODK_NonceValues* b);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
#endif // WIDEVINE_ODK_SRC_ODK_UTIL_H_
|