Mercurial > dropbear
comparison libtomcrypt/src/prngs/sober128.c @ 1733:d529a52b2f7c coverity coverity
merge coverity from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 26 Jun 2020 21:07:34 +0800 |
parents | e9dba7abd939 |
children |
comparison
equal
deleted
inserted
replaced
1643:b59623a64678 | 1733:d529a52b2f7c |
---|---|
187 LTC_ARGCHK(prng != NULL); | 187 LTC_ARGCHK(prng != NULL); |
188 LTC_ARGCHK(in != NULL); | 188 LTC_ARGCHK(in != NULL); |
189 if (inlen < (unsigned long)sober128_desc.export_size) return CRYPT_INVALID_ARG; | 189 if (inlen < (unsigned long)sober128_desc.export_size) return CRYPT_INVALID_ARG; |
190 | 190 |
191 if ((err = sober128_start(prng)) != CRYPT_OK) return err; | 191 if ((err = sober128_start(prng)) != CRYPT_OK) return err; |
192 if ((err = sober128_add_entropy(in, sober128_desc.export_size, prng)) != CRYPT_OK) return err; | 192 if ((err = sober128_add_entropy(in, inlen, prng)) != CRYPT_OK) return err; |
193 return CRYPT_OK; | 193 return CRYPT_OK; |
194 } | 194 } |
195 | 195 |
196 /** | 196 /** |
197 PRNG self-test | 197 PRNG self-test |