pike.git
/
src
/
post_modules
/
Nettle
/
nettle.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/post_modules/Nettle/nettle.cmod:1:
/* nettle.cmod -*- c -*- */
-
/* $Id: nettle.cmod,v 1.
55
2009
/
07/
05
19
:
41
:
58
grubba
Exp $ */
+
/* $Id: nettle.cmod,v 1.
56
2010
/
05
/
26
21
:
54
:
06
jonasw
Exp $ */
#include "global.h" #include "interpret.h" #include "svalue.h" /* For this_object() */ #include "object.h" #include "operators.h" #include "module_support.h" #include "threads.h"
pike.git/src/post_modules/Nettle/nettle.cmod:218:
if( !THIS->sources ) Pike_error("This random generator has no sources.\n"); if( source<0 || (unsigned)source>=THIS->ctx.nsources ) Pike_error("Invalid random source.\n"); if( entropy<0 ) Pike_error("Entropy must be positive.\n"); if( entropy>(data->len*8) ) Pike_error("Impossibly large entropy value.\n"); ret = yarrow256_update(&THIS->ctx, source, entropy, data->len, (const uint8_t *)data->str);
-
if (ret)
+
if (ret)
{
pike_generate_seed_file();
-
+
}
RETURN ret; } /*! @decl int(0..) needed_sources() *! The number of sources that must reach the threshold before a *! slow reseed will happen. */ PIKEFUN int(0..) needed_sources() optflags OPT_EXTERNAL_DEPEND; {