From 3534b428629be185e096be99e3bd5fdfe32d5544 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 18 Sep 2014 18:55:44 +0000 Subject: initial commit with rc for skalibs-2.0.0.0 --- src/librandom/surf_sinit.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/librandom/surf_sinit.c (limited to 'src/librandom/surf_sinit.c') diff --git a/src/librandom/surf_sinit.c b/src/librandom/surf_sinit.c new file mode 100644 index 0000000..ae7f480 --- /dev/null +++ b/src/librandom/surf_sinit.c @@ -0,0 +1,13 @@ +/* ISC license. */ + +#include +#include + +void surf_sinit (SURFSchedule_ref ctx, char const *s) +{ + SURFSchedule zero = SURFSCHEDULE_ZERO ; + register unsigned int i = 4 ; + *ctx = zero ; + for (; i < 12 ; i++) uint32_unpack(s + (i<<2) - 16, ctx->in + i) ; + for (i = 0 ; i < 32 ; i++) uint32_unpack(s + 32 + (i<<2), ctx->seed + i) ; +} -- cgit v1.3.1