pike.git / src / post_modules / Nettle / nettle.cmod

version» Context lines:

pike.git/src/post_modules/Nettle/nettle.cmod:1:   /* nettle.cmod -*- c -*- */      #include "global.h" - RCSID("$Id: nettle.cmod,v 1.18 2003/11/09 22:02:19 nisse Exp $"); + RCSID("$Id: nettle.cmod,v 1.19 2003/11/10 00:02:19 nisse Exp $");   #include "interpret.h"   #include "svalue.h"   /* For this_object() */   #include "object.h"   #include "module_support.h"      #include "nettle_config.h"      #ifdef HAVE_LIBNETTLE   
pike.git/src/post_modules/Nettle/nettle.cmod:103:    }       /*! @decl string get_seed()    *! Returns part of the internal state so that it can    *! be saved for later seeding.    *! @seealso    *! @[seed]    */    PIKEFUN string get_seed()    { +  if( !yarrow256_is_seeded(&THIS->ctx) ) +  Pike_error("Random generator not seeded.\n");    RETURN make_shared_binary_string(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]    */    PIKEFUN int(0..1) is_seeded()