"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/lib/isc/entropy_private.h" (4 Sep 2020, 883 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "entropy_private.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 #pragma once
   13 
   14 #include <stdlib.h>
   15 
   16 #include <isc/lang.h>
   17 
   18 /*! \file isc/entropy_private.h
   19  * \brief Implements wrapper around CSPRNG cryptographic library calls
   20  * for getting cryptographically secure pseudo-random numbers.
   21  *
   22  * - If OpenSSL is used, it uses RAND_bytes()
   23  * - If PKCS#11 is used, it uses pkcs_C_GenerateRandom()
   24  *
   25  */
   26 
   27 ISC_LANG_BEGINDECLS
   28 
   29 void
   30 isc_entropy_get(void *buf, size_t buflen);
   31 /*!<
   32  * \brief Get cryptographically-secure pseudo-random data.
   33  */
   34 
   35 ISC_LANG_ENDDECLS