mbedtls_mpi_set_bit() function
Modify a specific bit in an MPI.
Arguments
X
The MPI to modify. This must be initialized.
pos
Zero-based index of the bit to modify.
val
The desired value of bit \c pos: \c 0 or \c 1.
Return value
\c 0 if successful. #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. Another negative error code on other kinds of failure.
Notes
This function will grow the target MPI if necessary to set a bit to \c 1 in a not yet existing limb. It will not grow if the bit should be set to \c 0.
Functions called by mbedtls_mpi_set_bit()
mbedtls_mpi_set_bit()
Data read by mbedtls_mpi_set_bit()
Data written by mbedtls_mpi_set_bit()
mbedtls_mpi_set_bit()
mbedtls_mpi_set_bit()::ret all items filtered out
Type of mbedtls_mpi_set_bit()
mbedtls_mpi_set_bit()
size_t all items filtered out