- Fixed mpi_fill_random() to fill and create right size MPI
This commit is contained in:
parent
b08e6843c2
commit
39dfdaca8f
1 changed files with 2 additions and 2 deletions
|
@ -1618,10 +1618,10 @@ int mpi_fill_random( mpi *X, size_t size,
|
|||
{
|
||||
int ret;
|
||||
|
||||
MPI_CHK( mpi_grow( X, size ) );
|
||||
MPI_CHK( mpi_grow( X, CHARS_TO_LIMBS( size ) ) );
|
||||
MPI_CHK( mpi_lset( X, 0 ) );
|
||||
|
||||
MPI_CHK( f_rng( p_rng, (unsigned char *) X->p, X->n * ciL ) );
|
||||
MPI_CHK( f_rng( p_rng, (unsigned char *) X->p, size ) );
|
||||
|
||||
cleanup:
|
||||
return( ret );
|
||||
|
|
Loading…
Reference in a new issue