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.
47
2008
/
06
/
28
22
:
57
:
14
nilsson
Exp $ */
+
/* $Id: nettle.cmod,v 1.
48
2009
/
07
/
01
11
:
38
:
59
grubba
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:113:
*! Returns part of the internal state so that it can *! be saved for later seeding. *! @seealso *! @[seed] */ PIKEFUN string get_seed() optflags OPT_EXTERNAL_DEPEND; { if( !yarrow256_is_seeded(&THIS->ctx) ) Pike_error("Random generator not seeded.\n");
+
+
/* FIXME: From change notes for Nettle 2.0:
+
*
+
* * Changes to the yarrow256 interface. The automatic seed file
+
* generation, and the seed_file member in struct
+
* yarrow256_ctx, has been removed. To generate a new seed
+
* file, use yarrow256_random. The function
+
* yarrow256_force_reseed has been replaced by the two
+
* functions yarrow256_fast_reseed and yarrow256_slow_reseed,
+
* which were previously static. This interface change makes it
+
* easier to mix in the current content of the seed file before
+
* overwriting it with newly generated data.
+
*/
+
RETURN make_shared_binary_string((const char *)THIS->ctx.seed_file, YARROW256_SEED_FILE_SIZE); } /*! @decl int(0..1) is_seeded() *! Returns 1 if the random generator is seeded and ready *! to generator output. 0 otherwise. *! @seealso *! @[seed] */