selftest: Show vfs_virusscanner crashes when traversing a 2-level directory tree.
[Samba.git] / lib / util / genrand.h
blob70f36312e5856fb38beb4d670fd2e9b8028e126e
1 /*
2 Unix SMB/CIFS implementation.
4 Functions to create reasonable random numbers for crypto use.
6 Copyright (C) Jeremy Allison 2001
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 /**
23 * @brief Generate random values for session and temporary keys.
25 * @param[in] out A pointer to the buffer to fill with random data.
27 * @param[in] len The size of the buffer to fill.
29 void generate_random_buffer(uint8_t *out, int len);
31 /**
32 * @brief Generate random values for long term keys and passwords.
34 * @param[in] out A pointer to the buffer to fill with random data.
36 * @param[in] len The size of the buffer to fill.
38 void generate_secret_buffer(uint8_t *out, int len);
40 /**
41 * @brief Generate random values for a nonce buffer.
43 * This is also known as initialization vector.
45 * @param[in] out A pointer to the buffer to fill with random data.
47 * @param[in] len The size of the buffer to fill.
49 void generate_nonce_buffer(uint8_t *out, int len);