Skip to content

Commit

Permalink
Update PDF code with new PRNGs
Browse files Browse the repository at this point in the history
Updated pdf to recognise XORshiro256 and
lagged Fibonacci PRNGs.
  • Loading branch information
PartialVolume committed Mar 26, 2024
1 parent bb93793 commit e851769
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/create_pdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ int create_pdf( nwipe_context_t* ptr )
extern nwipe_prng_t nwipe_twister;
extern nwipe_prng_t nwipe_isaac;
extern nwipe_prng_t nwipe_isaac64;
extern nwipe_prng_t nwipe_add_lagg_fibonacci_prng;
extern nwipe_prng_t nwipe_xoroshiro256_prng;

/* Used by libconfig functions to retrieve data from nwipe.conf defined in conf.c */
extern config_t nwipe_cfg;
Expand Down Expand Up @@ -466,7 +468,21 @@ int create_pdf( nwipe_context_t* ptr )
}
else
{
snprintf( prng_type, sizeof( prng_type ), "Unknown" );
if( nwipe_options.prng == &nwipe_add_lagg_fibonacci_prng )
{
snprintf( prng_type, sizeof( prng_type ), "Fibonacci" );
}
else
{
if( nwipe_options.prng == &nwipe_xoroshiro256_prng )
{
snprintf( prng_type, sizeof( prng_type ), "XORshiro256" );
}
else
{
snprintf( prng_type, sizeof( prng_type ), "Unknown" );
}
}
}
}
}
Expand Down

0 comments on commit e851769

Please sign in to comment.