LibreOffice
LibreOffice 6.0 SDK C/C++ API Reference
random.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_RTL_RANDOM_H
21 #define INCLUDED_RTL_RANDOM_H
22 
23 #include <sal/config.h>
24 
25 #include <sal/saldllapi.h>
26 #include <sal/types.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
34 typedef void* rtlRandomPool;
35 
36 
40 {
46 };
47 
51 
52 
56 SAL_DLLPUBLIC rtlRandomPool SAL_CALL rtl_random_createPool (void) SAL_THROW_EXTERN_C();
57 
58 
64  rtlRandomPool Pool
65 ) SAL_THROW_EXTERN_C();
66 
67 
74 SAL_DLLPUBLIC rtlRandomError SAL_CALL rtl_random_addBytes (
75  rtlRandomPool Pool,
76  const void *Buffer,
77  sal_Size Bytes
78 ) SAL_THROW_EXTERN_C();
79 
80 
87 SAL_DLLPUBLIC rtlRandomError SAL_CALL rtl_random_getBytes (
88  rtlRandomPool Pool,
89  void *Buffer,
90  sal_Size Bytes
91 ) SAL_THROW_EXTERN_C();
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif // INCLUDED_RTL_RANDOM_H
98 
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SAL_DLLPUBLIC
Definition: saldllapi.h:30
void * rtlRandomPool
Random Pool opaque type.
Definition: random.h:34
Definition: random.h:42
SAL_DLLPUBLIC void rtl_random_destroyPool(rtlRandomPool Pool) SAL_THROW_EXTERN_C()
Destroy a Random Pool.
SAL_DLLPUBLIC rtlRandomPool rtl_random_createPool(void) SAL_THROW_EXTERN_C()
Create a Random Pool.
#define SAL_MAX_ENUM
Definition: types.h:228
Definition: random.h:43
__rtl_RandomError
Error Code enumeration.
Definition: random.h:39
SAL_DLLPUBLIC rtlRandomError rtl_random_addBytes(rtlRandomPool Pool, const void *Buffer, sal_Size Bytes) SAL_THROW_EXTERN_C()
Add bytes to a Random Pool.
Definition: random.h:44
enum __rtl_RandomError rtlRandomError
Error Code type.
Definition: random.h:50
SAL_DLLPUBLIC rtlRandomError rtl_random_getBytes(rtlRandomPool Pool, void *Buffer, sal_Size Bytes) SAL_THROW_EXTERN_C()
Retrieve bytes from a Random Pool.
Definition: random.h:41
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:352
Definition: random.h:45