From e851769025b20cd22695a4fc11dd00886e0c6f86 Mon Sep 17 00:00:00 2001 From: PartialVolume <22084881+PartialVolume@users.noreply.github.com> Date: Tue, 26 Mar 2024 21:17:23 +0000 Subject: [PATCH] Update PDF code with new PRNGs Updated pdf to recognise XORshiro256 and lagged Fibonacci PRNGs. --- src/create_pdf.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/create_pdf.c b/src/create_pdf.c index 754543b..b732ed7 100644 --- a/src/create_pdf.c +++ b/src/create_pdf.c @@ -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; @@ -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" ); + } + } } } }