Merge from Widevine repo of http://go/wvgerrit/93404 This is the unit tests, reference code, and documentation for OEMCrypto v16.2. Backwards compatibility should work for a v15 OEMCrypto. Some review comments will be addressed in future CLs. Bug: 141247171 Test: Unit tests Test: Media GTS tests on bonito Change-Id: I9d427c07580e180c0a4cfdc4a68f538d351c0ddd
25 lines
796 B
C
25 lines
796 B
C
/* Copyright 2019 Google LLC. All rights reserved. This file and proprietary */
|
|
/* source code may only be used and distributed under the Widevine Master */
|
|
/* License Agreement. */
|
|
|
|
#ifndef WIDEVINE_ODK_SRC_ODK_UTIL_H_
|
|
#define WIDEVINE_ODK_SRC_ODK_UTIL_H_
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.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);
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
#endif /* WIDEVINE_ODK_SRC_ODK_UTIL_H_ */
|