blob: ddd0a3822dbfd4897233b431952f263902afb4b1 [file] [log] [blame]
Alexander Afanasyevc74a6022011-08-15 20:01:35 -07001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
Ilya Moiseenkoc115fba2011-08-01 10:53:18 -07002/*
Alexander Afanasyev6b997c52011-08-08 12:55:25 -07003 * Copyright (c) 2011 University of California, Los Angeles
Ilya Moiseenkoc115fba2011-08-01 10:53:18 -07004 *
Alexander Afanasyev6b997c52011-08-08 12:55:25 -07005 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
Ilya Moiseenkoc115fba2011-08-01 10:53:18 -07008 *
Alexander Afanasyev6b997c52011-08-08 12:55:25 -07009 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Ilya Moiseenko <iliamo@cs.ucla.edu>
Ilya Moiseenkoc115fba2011-08-01 10:53:18 -070019 */
20
21/**
22 * @file random.h
23 * @brief Pseudo-random number generation
24 *
25 * Part of the CCNx C Library.
26 *
27 * Copyright (C) 2010 Palo Alto Research Center, Inc.
28 *
29 * This library is free software; you can redistribute it and/or modify it
30 * under the terms of the GNU Lesser General Public License version 2.1
31 * as published by the Free Software Foundation.
32 * This library is distributed in the hope that it will be useful,
33 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35 * Lesser General Public License for more details. You should have received
36 * a copy of the GNU Lesser General Public License along with this library;
37 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
38 * Fifth Floor, Boston, MA 02110-1301 USA.
39 */
40
41#ifndef CCN_RANDOM_DEFINED
42#define CCN_RANDOM_DEFINED
43
44#include <stddef.h>
45#include <openssl/rand.h>
46
47void ccn_random_bytes(unsigned char *buf, size_t size);
48void ccn_add_entropy(const void *buf, size_t size, int bits_of_entropy);
49
50#endif