blob: 5a576c0ba59c8609540d3409ab18c7228e70f4bc [file] [log] [blame]
Ilya Moiseenkoc115fba2011-08-01 10:53:18 -07001/*
2 * ccn_random.h
3 * Abstraction
4 *
5 * Created by Ilya on 7/29/11.
6 * Copyright 2011 __MyCompanyName__. All rights reserved.
7 *
8 */
9
10/**
11 * @file random.h
12 * @brief Pseudo-random number generation
13 *
14 * Part of the CCNx C Library.
15 *
16 * Copyright (C) 2010 Palo Alto Research Center, Inc.
17 *
18 * This library is free software; you can redistribute it and/or modify it
19 * under the terms of the GNU Lesser General Public License version 2.1
20 * as published by the Free Software Foundation.
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details. You should have received
25 * a copy of the GNU Lesser General Public License along with this library;
26 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
27 * Fifth Floor, Boston, MA 02110-1301 USA.
28 */
29
30#ifndef CCN_RANDOM_DEFINED
31#define CCN_RANDOM_DEFINED
32
33#include <stddef.h>
34#include <openssl/rand.h>
35
36void ccn_random_bytes(unsigned char *buf, size_t size);
37void ccn_add_entropy(const void *buf, size_t size, int bits_of_entropy);
38
39#endif