From 5ede1d017cb6e602db699a1b2364f9708de441c8 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Tue, 21 Apr 2015 20:51:04 -0500 Subject: add an internal api to osl to collect 'native' random numbers use /dev/urandom on unixes and rand_s() on windows Change-Id: Iccd6e01706f16d82f23cda0f0a410953c32fbc02 Reviewed-on: https://gerrit.libreoffice.org/15473 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- sal/inc/internal/oslrandom.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sal/inc/internal/oslrandom.h (limited to 'sal/inc') diff --git a/sal/inc/internal/oslrandom.h b/sal/inc/internal/oslrandom.h new file mode 100644 index 000000000000..305eaf937b65 --- /dev/null +++ b/sal/inc/internal/oslrandom.h @@ -0,0 +1,25 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_SAL_INC_INTERNAL_OSLRANDOM_H +#define INCLUDED_SAL_INC_INTERNAL_OSLRANDOM_H + +#if defined __cplusplus +extern "C" { +#endif + +int osl_get_system_random_data(char* buffer, size_t desired_len); + +#if defined __cplusplus +} +#endif + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit