Split mpi_is_prime() and make its first arg const

This commit is contained in:
Manuel Pégourié-Gonnard 2013-11-22 18:39:18 +01:00
parent 0160eacc82
commit 378fb4b70a
3 changed files with 69 additions and 31 deletions

View file

@ -653,7 +653,7 @@ int mpi_inv_mod( mpi *X, const mpi *A, const mpi *N );
* POLARSSL_ERR_MPI_MALLOC_FAILED if memory allocation failed,
* POLARSSL_ERR_MPI_NOT_ACCEPTABLE if X is not prime
*/
int mpi_is_prime( mpi *X,
int mpi_is_prime( const mpi *X,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng );