Home Contents | # mpi:toBinaryLE | Cipher/MPI | Core4 Lua Commands

## SYNOPSIS

1. str = mpi:toBinaryLE([size])
2. str = mpi:toBinaryBE([size])

## DESCRIPTION

The Core4 system includes a copy of mbed TLS.

Converts the stored number into binary format, using size bytes. When not specified, uses the size of the bignum container itself.

## RETURN VALUE

Returns a string on success.

In case of an error returns three values: nil, a string describing the error and a negative error code from the underlying mbed TLS implementation.

## ERRORS

If size is too small, returns the error MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL (-8).

## SEE ALSO

mpi:fromBinaryLE, mpi:fromBinaryBE