On 06/12/2015 09:21 AM, Stephan Mueller wrote:
>> +void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign)
>> >+{
>> >+ uint8_t *buf, *p;
>> >+ int n, ret;
>> >+
>> >+ if (!nbytes)
>> >+ return NULL;
>> >+
>> >+ n = mpi_get_size(a);
> Shouldn't n be unsigned i
Am Donnerstag, 11. Juni 2015, 12:05:38 schrieb Tadeusz Struk:
Hi Tadeusz,
>+ */
>+void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign)
>+{
>+ uint8_t *buf, *p;
>+ int n, ret;
>+
>+ if (!nbytes)
>+ return NULL;
>+
>+ n = mpi_get_size(a);
Shouldn't n be un
On Thu, Jun 11, 2015 at 12:05:38PM -0700, Tadeusz Struk wrote:
>
> +/**
> + * mpi_get_size() - returns max size required to store the number
> + *
> + * @a: A multi precision integer for which we want to allocate a bufer
> + *
> + * Return: size required to store the number
> + */
> +unsigned
Added a mpi_read_buf() helper function to export MPI to a buf provided by
the user, and a mpi_get_size() helper, that tells the user how big the buf is.
Implemented mpi_copy(), which was declared in mpi.h, but never implemented.
Signed-off-by: Tadeusz Struk
---
include/linux/mpi.h |3 ++
lib
4 matches
Mail list logo