2019-05-11 17:34:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
/*
|
2020-01-02 18:52:25 +00:00
|
|
|
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
2019-05-11 17:34:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <ntsecapi.h>
|
|
|
|
|
|
|
|
static inline bool __attribute__((__warn_unused_result__)) get_random_bytes(uint8_t *out, size_t len)
|
|
|
|
{
|
|
|
|
return RtlGenRandom(out, len);
|
|
|
|
}
|