Mercurial > dropbear
comparison libtomcrypt/src/prngs/sober128.c @ 1439:8d24733026c5 coverity
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 24 Jun 2017 23:33:16 +0800 |
parents | f849a5ca2efc |
children | 6dba84798cd5 |
comparison
equal
deleted
inserted
replaced
1400:238a439670f5 | 1439:8d24733026c5 |
---|---|
4 * algorithms in a highly modular and flexible manner. | 4 * algorithms in a highly modular and flexible manner. |
5 * | 5 * |
6 * The library is free for all purposes without any express | 6 * The library is free for all purposes without any express |
7 * guarantee it works. | 7 * guarantee it works. |
8 * | 8 * |
9 * Tom St Denis, [email protected], http://libtomcrypt.com | 9 * Tom St Denis, [email protected], http://libtom.org |
10 */ | 10 */ |
11 #include "tomcrypt.h" | 11 #include "tomcrypt.h" |
12 | 12 |
13 /** | 13 /** |
14 @file sober128.c | 14 @file sober128.c |
15 Implementation of SOBER-128 by Tom St Denis. | 15 Implementation of SOBER-128 by Tom St Denis. |
16 Based on s128fast.c reference code supplied by Greg Rose of QUALCOMM. | 16 Based on s128fast.c reference code supplied by Greg Rose of QUALCOMM. |
17 */ | 17 */ |
18 | 18 |
19 #ifdef SOBER128 | 19 #ifdef LTC_SOBER128 |
20 | 20 |
21 #include "sober128tab.c" | 21 #include "sober128tab.c" |
22 | 22 |
23 const struct ltc_prng_descriptor sober128_desc = | 23 const struct ltc_prng_descriptor sober128_desc = |
24 { | 24 { |
479 return CRYPT_ERROR_READPRNG; | 479 return CRYPT_ERROR_READPRNG; |
480 } | 480 } |
481 sober128_done(&prng); | 481 sober128_done(&prng); |
482 if (XMEMCMP(dst, tests[x].out, tests[x].len)) { | 482 if (XMEMCMP(dst, tests[x].out, tests[x].len)) { |
483 #if 0 | 483 #if 0 |
484 printf("\n\nSOBER128 failed, I got:\n"); | 484 printf("\n\nLTC_SOBER128 failed, I got:\n"); |
485 for (y = 0; y < tests[x].len; y++) printf("%02x ", dst[y]); | 485 for (y = 0; y < tests[x].len; y++) printf("%02x ", dst[y]); |
486 printf("\n"); | 486 printf("\n"); |
487 #endif | 487 #endif |
488 return CRYPT_FAIL_TESTVECTOR; | 488 return CRYPT_FAIL_TESTVECTOR; |
489 } | 489 } |
493 } | 493 } |
494 | 494 |
495 #endif | 495 #endif |
496 | 496 |
497 | 497 |
498 /* $Source: /cvs/libtom/libtomcrypt/src/prngs/sober128.c,v $ */ | 498 /* $Source$ */ |
499 /* $Revision: 1.8 $ */ | 499 /* $Revision$ */ |
500 /* $Date: 2006/11/05 00:11:36 $ */ | 500 /* $Date$ */ |