1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:27:35 +00:00

LibC: Expose AK::timing_safe_compare via timingsafe_memcmp(..)

Ports / other userland often needs such an implementation to function.
Lets expose `AK::timing_safe_compare` under the same name used used in
OpenBSD / FreeBSD / Solaris and other projects.
This commit is contained in:
Brian Gianforcaro 2022-03-12 22:09:54 -08:00 committed by Brian Gianforcaro
parent 0a5321b3f9
commit 01bd3c5563
2 changed files with 8 additions and 0 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021-2022, Brian Gianforcaro <bgianf@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -23,6 +24,7 @@ int strcmp(const char*, const char*);
int strncmp(const char*, const char*, size_t);
int memcmp(const void*, const void*, size_t);
int timingsafe_memcmp(const void*, const void*, size_t);
void* memcpy(void*, const void*, size_t);
void* memmove(void*, const void*, size_t);
void* memchr(const void*, int c, size_t);