comparison libtomcrypt/src/misc/crypt/crypt_register_all_prngs.c @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents
children
comparison
equal deleted inserted replaced
1470:8bba51a55704 1471:6dba84798cd5
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
2 *
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
5 *
6 * The library is free for all purposes without any express
7 * guarantee it works.
8 */
9
10 #include "tomcrypt.h"
11
12 /**
13 @file crypt_register_all_prngs.c
14
15 Steffen Jaeckel
16 */
17
18 #define REGISTER_PRNG(h) do {\
19 LTC_ARGCHK(register_prng(h) != -1); \
20 } while(0)
21
22 int register_all_prngs(void)
23 {
24 #ifdef LTC_YARROW
25 REGISTER_PRNG(&yarrow_desc);
26 #endif
27 #ifdef LTC_FORTUNA
28 REGISTER_PRNG(&fortuna_desc);
29 #endif
30 #ifdef LTC_RC4
31 REGISTER_PRNG(&rc4_desc);
32 #endif
33 #ifdef LTC_CHACHA20_PRNG
34 REGISTER_PRNG(&chacha20_prng_desc);
35 #endif
36 #ifdef LTC_SOBER128
37 REGISTER_PRNG(&sober128_desc);
38 #endif
39 #ifdef LTC_SPRNG
40 REGISTER_PRNG(&sprng_desc);
41 #endif
42
43 return CRYPT_OK;
44 }
45
46 /* ref: $Format:%D$ */
47 /* git commit: $Format:%H$ */
48 /* commit time: $Format:%ai$ */