summaryrefslogtreecommitdiffhomepage
path: root/src/prng_mbed.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2021-07-22 01:27:04 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2021-09-21 22:27:28 +0200
commit69054316e9429e95168de7fa3388b416de85c432 (patch)
treef5516c9ac0f73e632da00d3d103cbe8ac3354653 /src/prng_mbed.c
parentc0c75eded63da537bf30fdf0176f27070c8d6c7a (diff)
WIP extend prng to 2 outputsia-ta
Diffstat (limited to 'src/prng_mbed.c')
-rw-r--r--src/prng_mbed.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/prng_mbed.c b/src/prng_mbed.c
index ae5d3b8..7a3a6d1 100644
--- a/src/prng_mbed.c
+++ b/src/prng_mbed.c
@@ -52,11 +52,13 @@ void prng_update(prng_context_t *ctx, const uint8_t *input, size_t ilen)
mbedtls_md_update(&ctx->md, (const unsigned char *) input, ilen);
}
-void prng_finish(prng_context_t *ctx, uint8_t *output)
+void prng_finish(prng_context_t *ctx, uint8_t *output, uint8_t *output2)
{
uint8_t tmp[160];
mbedtls_md_finish(&ctx->md, tmp);
memcpy(output, tmp, 8);
+ if (output2)
+ memcpy(output2, tmp + 8, 8);
}
#if 0