prngs/sober128 - import fix

This commit is contained in:
Karel Miko 2017-04-29 13:36:45 +02:00
parent 9c972c833d
commit c6cee7bef0

View File

@ -187,8 +187,8 @@ int sober128_import(const unsigned char *in, unsigned long inlen, prng_state *pr
LTC_ARGCHK(in != NULL);
if (inlen < (unsigned long)sober128_desc.export_size) return CRYPT_INVALID_ARG;
if ((err = sober128_start(prng)) != CRYPT_OK) return err;
if ((err = sober128_add_entropy(in, inlen, prng)) != CRYPT_OK) return err;
if ((err = sober128_start(prng)) != CRYPT_OK) return err;
if ((err = sober128_add_entropy(in, sober128_desc.export_size, prng)) != CRYPT_OK) return err;
return CRYPT_OK;
}