Branch: Tag:

2003-11-10

2003-11-10 00:02:19 by Niels Möller <nisse@lysator.liu.se>

Let yarrow->get_seed throw an error of the generator is not seeded.

Rev: src/post_modules/Nettle/nettle.cmod:1.19

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() */
110:    */    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);    }